memory-audit
/memory-audit
Runs a memory hygiene pass on the project memory/ directory. Reviews all active memory files against the current codebase and archives or supersedes stale entries. Use before major feature work or when memory files feel out of date. Trigger this when someone says: clean up memory, audit memory files, memory is out of date, stale decisions, memory hygiene, are our memory files current, check if decisions are still valid. Do NOT use when searching for a specific memory entry — use /memory-query instead.
- Author
- chuckplayer ↗
- Repository
- claude-agent-pack ↗
- Licence
- MIT
- Last repository change
- 13.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 13.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Runs a memory hygiene pass on the project memory/ directory. Reviews all active memory files against the current codebase and archives or supersedes stale entries. Use before major feature work or when memory files feel out of date. Trigger this when someone says: clean up memory, audit memory files, memory is out of date, stale decisions, memory hygiene, are our memory files current, check if decisions are still valid. Do NOT use when searching for a specific memory entry — use /memory-query instead.
Original author description
Runs a memory hygiene pass on the project memory/ directory. Reviews all active memory files against the current codebase and archives or supersedes stale entries. Use before major feature work or when memory files feel out of date. Trigger this when someone says: clean up memory, audit memory files, memory is out of date, stale decisions, memory hygiene, are our memory files current, check if decisions are still valid. Do NOT use when searching for a specific memory entry — use /memory-query instead.
How it works
- 1. Review active files for staleness
- 1a. Check the repo map for drift
- 2. Check for gaps in decision coverage
- 3. Report
- 4. Lint the dialect
- Gotchas
SKILL.md preview
---
name: memory-audit
description: "Runs a memory hygiene pass on the project memory/ directory. Reviews all active memory files against the current codebase and archives or supersedes stale entries. Use before major feature work or when memory files feel out of date. Trigger this when someone says: clean up memory, audit memory files, memory is out of date, stale decisions, memory hygiene, are our memory files current, check if decisions are still valid. Do NOT use when searching for a specific memory entry — use /memory-query instead."
---
# Memory Audit
Run a memory hygiene pass on the project's `memory/` directory.
If `memory/` does not exist in the current project, report that and stop.
## 1. Review active files for staleness
1. Use `Glob("memory/**/*.md")` to discover all memory files.
2. Skip files with `status: superseded` or `status: archived` — these are history only.
3. For each **active** file, check whether it still accurately describes the codebase as it exists today:
- Does it reference a service, module, or dependency that no longer exists?
- Has the technology it covers been removed or replaced?
- Does a more recent decision supersede it?
4. For stale files, edit the fenced lowercase frontmatter in place:
- Context no longer applies → set `status: archived`
- Superseded by a newer decision → set `status: superseded` and populate `superseded-by:` with the
newer filename
- The issue was fixed → set `status: resolved` and add a `resolved: YYYY-MM-DD` key
**Write lowercase keys inside the `---` fence and nothing else.** `docs/MEMORY-WRITING.md` is the
authority on the dialect. This step previously instructed the bold unfenced dialect
retired on 2026-09-02, which would have made this hygiene skill the thing that broke the
dialect on every future pass. Change only the keys named above; leave the rest of the frontmatter
and the whole body alone.
5. Do not delete files — history is preserved by archiving, not deletion.
## 1a. Check the repo map for drift
If `memory/architecture/repo-map.md` exists, read its `verified-at-commit` stamp and run `git diff --name-only <that-sha>..HEAD`. If mapped directories have changed, added, or been removed since the stamp, do **not** archive the map — it is meant to be refreshed, not retired. Instead, flag it in the report and recommend running `/repo-map refresh`. Only archive the map if the project structure it describes has been entirely replaced.
## 2. Check for gaps in decision coverage
After reviewing active files, look for unrecorded decisions. Ask the user:
> "Are there major architectural decisions, known issues, or pattern choices that have been made but aren't recorded in memory? For example: a technology that was evaluated and rejected, a workaround for a platform constraint, or a deliberate deviation from the conventions."
If the user identifies gaps, offer to create new memory entries for them using the templates in `docs/MEMORY-WRITING.md`.
## 3. Report
Output a summary:
- Total active files reviewed
- Files archived (with reason)
- Files superseded (with reason and superseded-by)
- Gaps identified and whether new entries were created
- If no changes were needed, say so
## 4. Lint the dialect
Run the conformance check over the corpus, including any file this pass just edited:
```bash
bash scripts/lint-memory.sh
```
Exit `0` conforms, `1` is a finding, `2` means the checker's own self-test failed and its verdict is
worthless. **Fix any finding before reporting the pass complete** — a hygiene pass that leaves the
corpus non-conforming has not finished. Findings name the file and the rule; `docs/MEMORY-WRITING.md`
is the authority on the dialect.
**If `scripts/lint-memory.sh` is not present in the project, report this step as `not applicable` and
continue.** The script is newer than some checkouts. A missing checker is a stated gap — do not
describe it as a pass, and do not hand-roll a substitute check.
## Gotchas
- **Archiving too aggressively:** A memory file that references a pattern no longer in use may still be valid if it explains *why* that pattern was abandoned. Read for intent before archiving — "we removed X because Y" is still useful context even if X is gone.
- **Missing the memory/ directory entirely:** If `memory/` does not exist, report that clearly and stop. Do not create the directory — use /setup-project to scaffold the full project structure.
- **Confusing superseded with archived:** Superseded means a newer decision replaced this one — the newer file must be cited in `superseded-by:`. Archived means the content no longer applies at all (e.g., references a removed module). Resolved means the issue it records was fixed. These are different statuses with different meanings.
- **Inviting the user to create too many new entries at once:** Step 2 asks about gaps, but memory files are only useful when they capture non-obvious decisions. Do not turn this into a documentation sprint. Focus on decisions that would surprise a new contributor.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · chuckplayer/claude-agent-pack | 100 | MIT |
| awrshift/agent-memory-kit | 100 | MIT |
| fastled/fastled | 100 | MIT |
| awrshift/claude-memory-kit | 100 | MIT |
| aendrix03/graft | 100 | Apache-2.0 |
| kalabint/llm-tooling | 100 | AGPL-3.0 |
Database snapshot: 13.11.2026 · package version 8830e502610e (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
- 100memory-query
Search project memory files for a specific topic, decision, or constraint and return matching entries with citations. Use when you need to find what was decided about X, why Y was chosen, or whether Z is a known issue. Trigger this when someone says: what do we know about X, was… - 90clean-claude-memory
Audit, prune, rewrite, or relocate Claude Code project memory. Use when the user asks to review, clean, update, or remove Claude memory files, eliminate stale project memories, or rebuild MEMORY.md. - 100memory-lint
Use when saving or editing agent memory files, when MEMORY.md and the memory directory may have drifted (unindexed files, dangling index entries), when a recalled memory seems missing or duplicated, or for a periodic hygiene pass over a file-based memory store. Also use for… - 100memory-clean
Audit memory directory for structural issues (orphans, dangling refs, duplicates, missing sections, oversized entries) and staleness against session-history transcripts; report-first, fix-on-confirmation. Use when the user says "audit memory", "memory hygiene", or "find stale/duplicate memories". - 100audit-memory
Audit this repo's agent rules and memory files (CLAUDE.md, AGENTS.md, Cursor rules, the agent's memory folder) for lines that are wrong, out of date, in conflict, or no longer followed by the code. Use when the user asks to audit, check or clean up CLAUDE.md, AGENTS.md, rules or… - 100memory-pass
Use when memory entries may be stale - after a 7+ day session gap, after a close, block, or unblock event, or when a person or project mentioned in conversation contradicts an existing memory claim. Audits Active Project Context entries in MEMORY.md against brain/log.md,…