agentleFS
HaiTrieu0902HaiTrieu0902/agent-skills-kit/skills/memory-management/SKILL.md

memory-management

Skill0 starsChanged 8 months agoMITView on GitHub

Protocol for persisting and recalling context across sessions using the kit's two-tier memory. Use when you need to remember a decision, recall prior context, record a preference or convention, or prune stale memory.

17 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use agent-agent, agent-analyze-code-quality and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All access goes through scripts/memory_manager.py.

    line 18
  2. Very specific:

    If a memory names a file/flag/decision, verify it still holds — memory reflects what was true when written.

    line 39

“Common” is measured: kept by at least 6 in 10 of the 16 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

Memory Management

The kit's durable-context protocol. Pairs with the memory-keeper agent and the /memory workflow.

Overview

Memory has two tiers, both under memory/:

  • Short-term (short_term.json) — working context for the current session; cleared between sessions.
  • Long-term (long_term.json) — durable decisions, preferences, project facts, conventions; survives sessions. Indexed by MEMORY.md.

All access goes through scripts/memory_manager.py. Never hand-edit long_term.json or MEMORY.md — the engine keeps the schema and index in sync.

The Engine

python scripts/memory_manager.py init                  # create files if missing
python scripts/memory_manager.py recall "<query>"      # search title/content/tags
python scripts/memory_manager.py save --type <T> --title "<...>" --content "<...>" [--tags a,b] [--related id1,id2]
python scripts/memory_manager.py list [--type <T>]
python scripts/memory_manager.py show <id>
python scripts/memory_manager.py forget <id>
python scripts/memory_manager.py session-clear
python scripts/memory_manager.py stats

Recall-Before-Act

At the start of any non-trivial task:

  1. recall using the task's key nouns.
  2. Note anything relevant before you begin.
  3. If a memory names a file/flag/decision, verify it still holds — memory reflects what was true when written.

What to Save (and what not to)

TypeSave when…
decisionA choice future work must respect — include the why
preferenceThe user/team states how they want things done
projectA goal/constraint/milestone not derivable from code or git
conventionA naming/structure/style rule
referenceA URL, dashboard, ticket, external resource
factA non-obvious truth not written down elsewhere

Never save: code/README/git-derivable facts, secrets or credentials, session-only details, or duplicates.

Curation Rules

  • Recall before saving — if a similar entry exists, update it (forget + save), don't duplicate.
  • One fact per entry — scannable title, one or two sentences of content.
  • Absolute dates — convert "next sprint"/"yesterday" to a real date before saving.
  • Prune — forget anything reversed or proven wrong.
  • Link related entries with --related.

Anti-Patterns

❌✅
Save everything "just in case"Save only what future sessions need
Hand-edit JSON/indexGo through memory_manager.py
Recall after actingRecall first
Trust stale memoryVerify before relying
Store secretsNever

A small, accurate memory beats a large, doubtful one.

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.