Skip to content
Skills Library
Personal productivity · Review & audit

memory-management

/memory-management

Use when auditing, extracting, pruning, or writing Claude Code memory files. Covers memory file format, MEMORY.md index conventions, staleness scoring, claim extraction heuristics, destination routing, mutation rules, and archive conventions.

Licence
ISC
Last repository change
02.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 02.10.2026, without references to retired models or APIs.

Licence

ISC, otwarta.

What it does and when to use it

Use when auditing, extracting, pruning, or writing Claude Code memory files. Covers memory file format, MEMORY.md index conventions, staleness scoring, claim extraction heuristics, destination routing, mutation rules, and archive conventions.

Original author description

Use when auditing, extracting, pruning, or writing Claude Code memory files. Covers memory file format, MEMORY.md index conventions, staleness scoring, claim extraction heuristics, destination routing, mutation rules, and archive conventions.

How it works

  1. Memory File Format
  2. MEMORY.md Index Format
  3. Staleness Scoring
  4. Claim Extraction Heuristics (Deep Audit)
  5. Destination Routing
  6. Mutation Rules
  7. Archive Convention
Original SKILL.md headings · 90 lines, 603 words
SKILL.md preview
---
name: memory-management
description: Use when auditing, extracting, pruning, or writing Claude Code memory files. Covers memory file format, MEMORY.md index conventions, staleness scoring, claim extraction heuristics, destination routing, mutation rules, and archive conventions.
version: 0.2.0
---

# Memory Management

## Memory File Format

Frontmatter schema (simple key: value, NOT general YAML):

    ---
    name: <string, required>           # short identifier
    description: <string, required>    # one-line summary for relevance matching
    type: <enum, required>             # value | user | feedback | project | reference
    ---

- All values are plain strings, no quoting needed unless value contains `:`
- No nested structures, no lists, no multi-line values
- Body follows after the closing `---` delimiter as markdown

## MEMORY.md Index Format

- Plain markdown file, no frontmatter
- Contains links to individual memory files with brief descriptions
- Lines after 200 are truncated by Claude Code's loader — keep concise
- Entry format: `- [filename.md](filename.md) — brief description`
- When writing: create individual .md file first, then append entry

## Staleness Scoring

Exponential decay: `score = 100 * (1 - exp(-age_days * ln(2) / half_life))`

| Type | Half-life | Score 50 at | Score 90 at |
|------|-----------|-------------|-------------|
| value | 365 days | 365d | ~1213d |
| user | 180 days | 180d | ~598d |
| feedback | 90 days | 90d | ~299d |
| reference | 60 days | 60d | ~199d |
| project | 14 days | 14d | ~47d |
| unknown | 30 days | 30d | ~100d |

Score-to-action: 0-50 = keep, 50-75 = review, 75-100 = prune.

Deep verification modifiers (additive, capped at 100):
- +20 if referenced file is missing
- +30 if referenced function/class not found
- +10 if URL returns non-200
- +15 if referenced branch doesn't exist

## Claim Extraction Heuristics (Deep Audit)

| Claim Type | Detection Pattern | Verification |
|------------|-------------------|--------------|
| File path | Contains `/`, ends with file extension | Glob for existence |
| Function/class | Backtick identifier in camelCase/PascalCase/snake_case | Grep in project |
| URL | Starts with `http://` or `https://` | curl HEAD request |
| Branch | After "branch" keyword or git pattern in backticks | `git branch -a` |
| Package | In dependency/package context | Grep in manifest files |

Skip generic descriptions that aren't verifiable (e.g., "use a database" vs "uses PostgreSQL 15").

## Destination Routing

| Destination | When to Use | Target Path |
|-------------|-------------|-------------|
| Memory file (value) | Learned value choices — "X is better than Y" | Session's project `memory/` dir, type=value |
| Memory file | Knowledge for Claude's future behavior | Session's project `memory/` dir |
| CLAUDE.md | High-impact instructions for every conversation | Session's project root CLAUDE.md |
| Knowledge file | Human-readable notes, decision logs | `docs/knowledge/` in project root |
| Skip | Session-specific, not worth preserving | — |

**Priority:** Value choices are the most durable memories. When extracting, surface them first. Facts decay (files move, APIs change); values persist (readability > cleverness survives any rewrite).

**Rule:** Always target the session's originating project, not the current shell cwd.

## Mutation Rules

| Layout | How to Write |
|--------|-------------|
| Index + files | Create .md file with frontmatter, append to MEMORY.md |
| Standalone MEMORY.md | Convert to index layout: create first .md file, rewrite MEMORY.md as index |
| No memory dir | Create `memory/`, create MEMORY.md, create .md file |
| Malformed frontmatter | Read as type=unknown. Never corrupt existing files. |

## Archive Convention

- Location: `memory/archive/` subdirectory
- Files preserved intact (frontmatter + content)
- MEMORY.md entry removed on archive
- `iter_memories()` skips `archive/` — invisible to dashboard/audit/tokens
- Standalone MEMORY.md: archiving not supported (offer delete or keep)
- Restore: manual move from `archive/` + re-add to MEMORY.md

Versions

RepositoryScoreLicence
This page · xiaolai/echo-sleuth-for-claude90ISC
opencue/cuecards100MIT
opencue/cuecards100MIT
aaron-he-zhu/aaron-marketing-skills100Apache-2.0
ruvnet/ruflo100MIT
j4flmao/agent-skills100MIT
raoulbia-ai/claude-recall100MIT
verygoodplugins/mcp-automem100MIT
jau123/claude-memory-manager95MIT

Database snapshot: 13.11.2026 · package version d24a9d9205b5 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95claw-memory-management
    Workspace memory management guide: memory layers, writing rules, entry format, and maintenance. Use when writing, updating, or maintaining memory files (memory/YYYY-MM-DD.md and MEMORY.md).
  • 100auto-memory
    This skill should be used when the user asks to 'set up memory', 'create memory files', 'create MEMORY.md', 'set up topic files', 'improve memory organization', 'what should I remember', 'how to structure memory files', 'MEMORY.md is too long', 'what goes in memory vs topic…
  • 90memory-tidy
    Use when auditing, consolidating, or cleaning a repo's .claude/memory store, "dọn memory", "memory tidy", the biweekly memory audit, duplicate or stale memory notes, MEMORY.md index drift, or a scheduled memory-tidy audit. NOT for the built-in machine-local auto-memory under…
  • 90memory-store-audit
    Migrate-verify-delete workflow for auditing the machine's Claude Code auto-memory stores once their total size passes the nudge threshold. TRIGGER when: nudged by nudge-memory-store-audit.sh's additionalContext advisory, or asked to audit, prune, or clean up the Claude Code…
  • 100claude-code-memory-and-rules
    This skill should be used when the user asks to "set up memory", "configure CLAUDE.md", "add rules", "create project rules", "organize instructions", or mentions Claude Code memory, CLAUDE.md files, .claude/rules, rules, or project instructions. Also use when the user wants to…
  • 90memory-discipline
    Use when recording lessons learned in a project, or when a project contains lessons/ or MEMORY.md — file-based memory format and read/write rules that measurably improve long-horizon performance.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.