agentleFS
bocodes1bocodes1/claude-skills/memory-management/SKILL.md

memory-management

Skill0 starsChanged 7 months agoMITView on GitHub

Smart memory operations for Claude Code's file-based memory system - daily hygiene, weekly rollups, monthly archives, cross-referencing, and pruning. Use during maintenance, when memory files grow large (>100 lines), or when user asks about something from weeks/months ago

23 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

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

  • 0

    Common

    Most of the 22 edited versions we read keep these.

  • 12

    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:

    Update relevant memory files with new learnings

    line 34
  2. Distinctive:

    Create new memory files for genuinely new topics

    line 35
  3. Distinctive:

    Update MEMORY.md index if files were added/removed

    line 36
  4. Distinctive:

    Check feedback memories — are they still relevant?

    line 48
  5. Distinctive:

    Verify user memories — has anything changed?

    line 49
  6. Distinctive:

    When writing new memories, check for connections:

    line 53
  7. Distinctive:

    Keep the index scannable:

    line 85
  8. Distinctive:

    When looking for past context:

    line 92
  9. Distinctive:

    Check MEMORY.md index for relevant pointers

    line 93
  10. Distinctive:

    Read the specific memory file

    line 94
  11. Distinctive:

    If not found, grep across all memory files

    line 95
  12. Distinctive:

    Only if still not found, check Obsidian vault for partner agent memories

    line 96

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

Memory Architecture (Claude Code)

~/.claude/projects/<project>/memory/
  MEMORY.md              # Index file — pointers to memory files
  user_*.md              # User profile memories
  feedback_*.md          # Working style / correction memories
  project_*.md           # Active project context
  reference_*.md         # External system pointers

Each memory file has frontmatter:

---
name: descriptive name
description: one-line summary for relevance matching
type: user|feedback|project|reference
---

MEMORY.md is the index — one-line pointers, not content. Keep under 200 lines.

Operations

1. Daily Session Hygiene

At session end (or via obsidian-memory-sync skill):

  • Update relevant memory files with new learnings
  • Create new memory files for genuinely new topics
  • Update MEMORY.md index if files were added/removed
  • Never duplicate — check existing memories before creating new ones

2. Weekly Rollup (Every 7 Days)

Review all memory files:

  • Merge related memories that have grown fragmented
  • Update project memories with current status
  • Verify reference memories still point to valid resources
  • Remove memories that are now captured in code/git history

3. Monthly Archive

  1. Review all project memories — archive completed projects
  2. Check feedback memories — are they still relevant?
  3. Verify user memories — has anything changed?
  4. Audit MEMORY.md index — remove dead links, ensure all files are indexed

4. Cross-Reference Protocol

When writing new memories, check for connections:

  • Does this relate to an existing project? -> Update that memory instead
  • Does this contradict something previously noted? -> Flag and resolve
  • Does this complete/update an open question? -> Close the loop
  • Is this a pattern we've seen before? -> Note the pattern

5. Pruning Rules

Keep forever:

  • User preferences and working agreements
  • Business decisions and rationale
  • Important relationships and context
  • Lessons learned from mistakes
  • Financial data and commitments

Prune after 30 days:

  • Routine task completion notes
  • Transient debugging sessions
  • Superseded information (old plans replaced by new ones)

Prune after 90 days:

  • Resolved blockers
  • Completed one-off tasks
  • Temporary workarounds that were properly fixed

Never store (use code/git instead):

  • Code patterns, conventions, architecture, file paths
  • Git history, recent changes, who-changed-what
  • Debugging solutions or fix recipes
  • Anything already in CLAUDE.md files

6. MEMORY.md Index Curation

Keep the index scannable:

  • Group by type (User, Feedback, Projects, References)
  • Each entry: - [Title](file.md) — one-line hook (under 150 chars)
  • Alphabetize within groups
  • Total lines under 200

7. Search & Retrieval

When looking for past context:

  1. Check MEMORY.md index for relevant pointers
  2. Read the specific memory file
  3. If not found, grep across all memory files
  4. Only if still not found, check Obsidian vault for partner agent memories

Maintenance Schedule

TaskFrequencyTrigger
Session memory updateEvery session endSession close / obsidian-memory-sync
Weekly rollupEvery 7 daysSelf-improvement Sunday review
Monthly archiveEvery 30 daysFirst session of new month
MEMORY.md curationEvery 14 daysDuring weekly rollup
Pruning passEvery 30 daysDuring monthly archive

Integration Points

  • self-improvement: Weekly review triggers memory rollup
  • know-me: User preferences detected get stored via memory management protocols
  • obsidian-memory-sync: Session end captures cross-skill context to Obsidian vault
  • All skills: Memory captures cross-skill context (VPS sessions, store builds, research)

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.