memory-review · hoangsonww — Claude Code skill: audit your agent memory
Walks the agent's file-based memory: CLAUDE.md files and per-project auto-memory. Flags facts that went stale or grew too big.
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill memory-review -a claude-codeWhat memory-review does
The skill pulls memory data from the Agent Monitor Config Explorer API running at http://localhost:4820. One call to GET /api/cc-config/memory returns everything: CLAUDE.md records with scope, size, mtime and a preview, plus auto-memory files from ~/.claude/projects/<slug>/memory/*.md carrying a name, an index flag and frontmatter. A second endpoint, GET /api/cc-config/file?path=<abs>, hands back the whole body of a single file when a fact needs a full read before you touch it.
The report has four parts. First a table of CLAUDE.md entries: scope, file, size in KB, modified date, truncation flag. Then auto-memory grouped by project, with the MEMORY.md index first and individual facts after it. Part three compares that index against what actually sits on disk, catching facts the index never mentions and index links pointing at files that are gone. Part four marks stale and oversized entries.
The dashboard has to be up. Without it the skill reports that http://localhost:4820 is unreachable and tells you to run npm start from the repo root. Edits go through PUT and DELETE on /api/cc-config/file, and a timestamped backup is written before each one. Default behaviour is read-only though: no file gets changed or removed without your confirmation for that specific action.
What it helps with
- spot auto-memory facts the
MEMORY.mdindex never references - catch index links pointing at files that no longer exist
- split a bloated CLAUDE.md into smaller single-fact files
- find entries nobody has touched in a long time and decide their fate
- read a fact in full before editing it
Example prompts for the agent
- Review the whole agent memory store across every project
- Show auto-memory for the project
-Users-david-WebstormProjects-fooonly - Go through just the CLAUDE.md files and tell me what's truncated
How to install memory-review
1Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill memory-review -a claude-code2Manually: put the files in place
~/.claude/skills/memory-review/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/memory-review/
1Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill memory-review -a codex2Manually: put the files in place
.agents/skills/memory-review/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill memory-review -a cursor2Manually: put the files in place
.cursor/skills/memory-review/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install hoangsonww/Claude-Code-Agent-Monitor memory-review2Manually: put the files in place
.github/skills/memory-review/SKILL.md1Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill memory-review -a gemini-cli2Platform CLI
gemini skills install https://github.com/hoangsonww/Claude-Code-Agent-Monitor --path plugins/ccam-config/skills/memory-reviewManually: put the files in place
.devin/skills/memory-review/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill memory-review -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about memory-review
How do I install memory-review in Claude Code?
Run npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill memory-review -a claude-code. The skill file lands at ~/.claude/skills/memory-review/SKILL.md.
What does memory-review do?
It lists the agent's memory files through the Agent Monitor API, groups auto-memory by project, and checks the index against the individual facts. Stale and oversized entries get flagged.
Does it need the dashboard running?
Yes, it talks to http://localhost:4820. If nothing answers there, start it with npm start from the repo root.
Source text
SKILL.md · MIT
---
name: memory-review
description: >
Review the file-based memory store via the Agent Monitor Config Explorer API:
the user and project CLAUDE.md plus per-project auto-memory files under
~/.claude/projects/<slug>/memory/*.md. Groups by project, shows the index
(MEMORY.md) vs per-fact files, and flags stale or oversized facts. Reads
/api/cc-config/memory and /api/cc-config/file?path=. Use when curating agent
memory.
---
# Memory Review
Curate the user's file-based agent memory: the long-form CLAUDE.md files plus
the per-project auto-memory store — read through the Agent Monitor dashboard at
`http://localhost:4820`.
## Input
The user provides: **$ARGUMENTS**
This may be:
- empty — review the whole memory store across every project (default).
- a project slug (e.g. `-Users-david-WebstormProjects-foo`) — restrict the
review to that one project's auto-memory dir.
- "claude-md" — review only the user/project CLAUDE.md files.
## Data Sources
| Endpoint | Returns |
|----------|---------|
| `GET /api/cc-config/memory` | `{ items:[…] }`. CLAUDE.md entries: `{ scope:"user"\|"project", file, size, mtime, preview }`. Auto-memory entries: `{ scope:"auto-memory", project, name, isIndex, file, size, mtime, frontmatter, preview }` |
| `GET /api/cc-config/file?path=<abs>` | full body of one file: `{ ok, file, size, mtime, truncated, text }` — use to read a fact in full before recommending an edit |
## Report Sections
### 1. CLAUDE.md overview
List the user and project CLAUDE.md entries with `scope`, `size` (KB), and
last-modified (`mtime`). Note any that are `truncated` (over 256 KB) — these
are oversized and worth splitting into auto-memory facts.
### 2. Per-project auto-memory, grouped
Group `scope: "auto-memory"` items by `project`. For each project show the
**index** (`isIndex: true`, typically `MEMORY.md`) first, then the per-fact
files. For each fact show `name`, `frontmatter.description` if present, `size`,
and `mtime`.
### 3. Index vs per-fact consistency
Within each project, compare the index (`MEMORY.md`) against the per-fact files
present. Flag facts that exist on disk but are not referenced by the index, and
index entries that point at files which no longer appear in `/memory`.
### 4. Stale & oversized facts
Flag facts whose `mtime` is old relative to the rest of the store (stale —
candidates to confirm or retire) and facts whose `size` is large (oversized —
candidates to split into smaller, single-fact files). When the user wants to
act on one, fetch its full body with `GET /api/cc-config/file?path=<file>`
before recommending changes.
## Editing memory (mutations)
Auto-memory files are editable through the Config Explorer. To create/overwrite
a fact:
```bash
curl -s -X PUT http://localhost:4820/api/cc-config/file \
-H 'Content-Type: application/json' \
-d '{"scope":"auto-memory","type":"auto-memory","project":"<slug>","name":"<fact>.md","content":"..."}'
```
To delete a fact:
```bash
curl -s -X DELETE http://localhost:4820/api/cc-config/file \
-H 'Content-Type: application/json' \
-d '{"scope":"auto-memory","type":"auto-memory","project":"<slug>","name":"<fact>.md"}'
```
A timestamped backup is written automatically before any edit or delete.
The user/project CLAUDE.md uses `type:"memory"` with a `scope` and no `name`.
**Never edit or delete a memory file without explicit per-action confirmation
from the user** — default to read-only review.
## Output
- Section 1 as a short table (`Scope | File | Size | Modified | Truncated`).
- Section 2 grouped by project, index first, then facts.
- Sizes in KB; timestamps as relative age; use ▲ for oversized / stale flags.
- Cite only fields the API returned — never invent facts, names, or sizes.
- If the dashboard is unreachable at `http://localhost:4820`, say so and tell
the user to start it with `npm start` from the repo root.
© hoangsonww · MIT · hoangsonww/Claude-Code-Agent-Monitor
Similar skills
All skills for Agent setup: memory, context, orchestration →memory-review by other authors comes first.