agentleFS
songjiun10-collabsongjiun10-collab/Senior-thinking-skills/persistent-memory/SKILL.md

persistent-memory

Skill87 starsChanged 31 days agoMITView on GitHub

Capture a correction or preference into a durable per-topic file instead of re-learning it every session — the explicit workaround for the fact that Claude Code sessions and subagent dispatches don't remember each other. Use when the same kind of correction keeps recurring across sessions, when starting a task type you expect to repeat, or when delegate-to-subagents's reusable-template advice applies but you need the actual mechanism. Skip for a one-off correction that won't recur, and skip for anything project-wide enough to belong in CLAUDE.md instead. Bundles scripts/memory.py, a small CLI for reading, appending to, and listing memory files.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the file matching the model actually running before applying this skill.

    line 23

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Persistent Memory

The judgment call — when to persist something, what to write, how much — is calibrated per model. Pick the file for the model actually running:

ModelFile
Claude Opus 5.5opus-5-5.md
Claude Fable 5.1fable-5-1.md
Claude Sonnet 5sonnet-5.md
Claude Sonnet 5.5sonnet-5-5.md
Claude Haiku 5.5haiku-5-5.md
OpenAI GPT-6 Astragpt-6-astra.md
OpenAI GPT-6 Solgpt-6-sol.md
OpenAI GPT-6.1 Solgpt-6-1-sol.md
OpenAI GPT-6 Lunagpt-6-luna.md

Read the file matching the model actually running before applying this skill.

Running a model not listed above (an older generation, a different model family entirely)? sonnet-5.md carries the fullest general-purpose version of the underlying procedure — read that one rather than skipping this skill.

The script

scripts/memory.py gives you a plain-text-in, plain-text-out CLI over one memory file per topic — no database, no format to learn. This mechanism is the same regardless of which model is running:

python3 scripts/memory.py show <topic>              # print the current file, or say there isn't one
python3 scripts/memory.py append <topic> "<note>"    # add one dated line
python3 scripts/memory.py list                       # list every topic that has a memory file

Files live under .claude/memory/<topic>.md by default (override with MEMORY_DIR). show is meant to run before starting a recurring task — read it the same way you'd read a reusable dispatch template before delegating. append is meant to run right after a correction, not batched up for later, or it doesn't get captured at all.

This script only reads and appends — it never rewrites or deletes an existing line, so pruning a stale entry (see the model file's "Keeping it honest") is a manual edit, not something the script does for you silently.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.