Skip to content
Back to skills

Right Memory File

ASecurity

Manage your long-term memory via MEMORY.md

  • 35 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 19, 2026
ai-agentsgoapisecurity

Works with

  • claude code
  • api

Security analysis

A100/100

Scanned September 19, 2026

npx -y skills add onsails/right-agent --skill right-memory-file --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Right Memory File?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Right Memory File
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/onsails-right-memory-file/badge)](https://www.skillsdirectory.com/skills/onsails-right-memory-file)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: right-memory
description: Manage your long-term memory via MEMORY.md
---

# Memory Management

Your long-term memory is stored in `MEMORY.md` in your home directory.
This file is automatically injected into your system prompt at the start
of each interaction (truncated to 200 lines).

## Remember request router

When the user says "remember", "save this", or "don't forget", first classify what kind of persistent fact it is. The word "remember" means "persist this", not "write to `MEMORY.md`".

- Tool/API/environment rules -> `TOOLS.md`
- Stable user facts, preferences, timezone, communication style -> `USER.md`
- Your voice, autonomy, pushback, escalation boundaries -> `SOUL.md`
- Core identity, principles, security posture -> `IDENTITY.md`
- Reusable procedures -> learned skill
- Narrow durable context with no better home -> memory

After this routing, memory is the fallback for facts with no better home.

## How to use

Use Claude Code's built-in `Edit` and `Write` tools to manage MEMORY.md:

- **Add an entry:** Append a new line or section to MEMORY.md
- **Update an entry:** Edit an existing line to correct or refine it
- **Remove stale entries:** Delete lines that are no longer relevant

## What belongs in MEMORY.md

Things that don't have a home in your other files (`TOOLS.md`,
`IDENTITY.md`, `SOUL.md`, `USER.md`):

- Granular or time-stamped observations too narrow for `USER.md`
- Session-specific corrections worth carrying to the next turn
- Cross-session context transcripts won't reconstruct

## What does NOT belong here

Route these to the correct file instead of writing to MEMORY.md:

- "Use tool X for task Y" → `TOOLS.md`
- Stable user preferences → `USER.md`
- Your identity / values / tone → `IDENTITY.md` / `SOUL.md`
- Reusable procedures → save as a skill
- Task progress, TODO state, completed-work logs — transcripts cover these

## Write declaratively, not imperatively

MEMORY.md is re-read as context on every turn. Imperative phrasing
("Always do X") gets interpreted as a directive and can override the
user's current request.

- `"User prefers pytest-xdist for parallel tests"` ✓
- `"Always run tests with pytest -n 4"` ✗
- `"API foo returns 422 when `input` is used instead of `arguments`"` ✓
- `"Use `arguments` for API foo"` ✗ (this is a rule — goes in `TOOLS.md`)

## Keep it concise

MEMORY.md is truncated to **200 lines** in your prompt. Periodically:
- Remove entries no longer relevant
- Consolidate related entries into single lines
- Remove duplicates
- Move tool rules / user preferences / etc. to their proper homes

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.