memory-review · hoangsonww — скилл для Claude Code: ревизия памяти агента
Разбирает файловую память агента: CLAUDE.md и авто-память по проектам. Показывает, что устарело, а что разрослось.
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill memory-review -a claude-codeЧто делает memory-review
Скилл читает память через API Config Explorer дашборда Agent Monitor на http://localhost:4820. Он запрашивает GET /api/cc-config/memory и получает список: записи CLAUDE.md с областью видимости, размером, временем правки и превью, а также файлы авто-памяти из ~/.claude/projects/<slug>/memory/*.md с именем, признаком индекса и frontmatter. Отдельный вызов GET /api/cc-config/file?path=<abs> отдаёт полный текст одного файла, если факт нужно прочитать целиком перед правкой.
Отчёт состоит из четырёх частей. Сначала таблица по CLAUDE.md: область, файл, размер в КБ, дата изменения, признак обрезки. Потом авто-память, сгруппированная по проектам, где индекс MEMORY.md идёт первым, а за ним отдельные факты. Третья часть сверяет индекс с тем, что реально лежит на диске: факты без ссылки из индекса и ссылки на исчезнувшие файлы. Четвёртая помечает устаревшие и слишком крупные факты.
Дашборд должен быть запущен, иначе скилл просто сообщит, что http://localhost:4820 недоступен, и предложит поднять его командой npm start из корня репозитория. Правки возможны через PUT и DELETE на /api/cc-config/file, перед каждой записью автоматически создаётся резервная копия с отметкой времени. Но по умолчанию скилл работает только на чтение: без отдельного подтверждения на каждое действие он ничего не меняет и не удаляет.
Какие задачи решает
- найти факты в авто-памяти, на которые не ссылается индекс
MEMORY.md - отловить ссылки на файлы, которых больше нет в хранилище
- разбить разросшийся CLAUDE.md на отдельные факты
- вычислить давно не обновлявшиеся записи и решить, нужны ли они ещё
- прочитать полный текст факта перед тем, как его править
Примеры запросов агенту
- Проверь всю память агента по всем проектам
- Покажи авто-память только для проекта
-Users-david-WebstormProjects-foo - Разбери только файлы CLAUDE.md: что там обрезано и что стоит разбить
Как установить memory-review
1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill memory-review -a claude-code2Вручную: положить файлы
~/.claude/skills/memory-review/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/memory-review/
1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill memory-review -a codex2Вручную: положить файлы
.agents/skills/memory-review/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill memory-review -a cursor2Вручную: положить файлы
.cursor/skills/memory-review/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install hoangsonww/Claude-Code-Agent-Monitor memory-review2Вручную: положить файлы
.github/skills/memory-review/SKILL.md1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill memory-review -a gemini-cli2Командой платформы
gemini skills install https://github.com/hoangsonww/Claude-Code-Agent-Monitor --path plugins/ccam-config/skills/memory-reviewВручную: положить файлы
.devin/skills/memory-review/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill memory-review -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о memory-review
Как установить memory-review в Claude Code?
Выполните npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill memory-review -a claude-code, после чего файл скилла окажется по пути ~/.claude/skills/memory-review/SKILL.md.
Что делает memory-review?
Собирает список файлов памяти агента через API Agent Monitor, группирует авто-память по проектам и сверяет индекс с отдельными фактами. Помечает устаревшие и слишком крупные записи.
Нужен ли запущенный дашборд?
Да, скилл обращается к http://localhost:4820. Если он не отвечает, запустите npm start из корня репозитория.
Исходный текст
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
Похожие скиллы
Все скиллы по теме «Настройка агента: память, контекст, субагенты» →Сначала — memory-review от других авторов.