consolidate
БесплатноБез исполняемых скриптовНе проверенConsolidates project memory across harness and .memory/ with theme clustering, practical-expiry prune, ground-truth verify, and an adversarial second pass…
от FradSer★ 598 звёзд на GitHubОб этом скилле
Memory — Active Write & Consolidate
The project's memory lives in two locations that must stay identical for safe (public) files (idempotent):
~/.claude/projects/<escaped-cwd>/memory/— harness, loaded by Claude Code, written first.memory/— canonical, git-tracked, written second — safe files only
Resolve the harness path: ~/.claude/projects/<cwd-with-/→->/memory/ (probe both space-handling forms: /→-+ →- and /→-+space-kept).
Private files (user preferences, credentials, PII) live in harness only. They must never appear as files or index lines under .memory/.
Active Write
When you encounter a decision, preference, lesson, or anything worth remembering, write it immediately — do not wait for /memory:consolidate.
Before writing
- Search existing memories first (Grep/Read harness
*.mdby theme keywords). If one already covers the topic, edit that file instead of creating a near-duplicate. - Refuse pure operation logs: if you cannot state a durable Why and a reusable How to apply, do not write a memory. Put timelines in git/commits/docs, not memory.
- Prefer one decision per file. Two independent decisions → two files; the same decision learned twice → one file.
Privacy check
.memory/ is a public GitHub repo. Private = secrets/PII/credentials or user preferences / personal workflow habits. Safe technical content → both locations. Private → harness only; harness index line ends with (harness only).
How to write
- Write file to harness
.../memory/<filename>.md - If safe → write identical file to
.memory/<filename>.md. If private → do not write to.memory/; if.memory/<filename>.mdalready exists, delete it. - Update indexes:
- Harness
MEMORY.md: include every file (private lines marked(harness only)) .memory/MEMORY.md: safe lines only — never copy(harness only)lines into the public index
- Harness
File naming: <type>_<kebab-slug>.md (type: feedback, project, reference)
Format:
---
name: <kebab-slug>
description: <one-line hook distinguishing this from similar files>
type: feedback | project | reference
---
<the fact>
**Why:** <why this decision exists>
**How to apply:** <actionable rules>
**Related:** other-memory another-memory
Memory is decision log, not operation log
Every memory file answers two questions only:
- Why — why this decision or rule exists
- How to apply — what to do next time
Remove all operation history (version numbers, dates-as-timeline, "first X then Y"). That lives in git log. Keep only the durable rationale and actionable rules.
MEMORY.md index format
Each line: one concise sentence, no version numbers, no date ranges, no timeline descriptions. One line per surviving file. Prefer ≤50 lines for scanability; if more files exist, keep every entry and group by theme — never drop entries to hit 50.
Good: feedback_git_commit_hook_needed.md — git PreToolUse hook intercepts git add/commit, redirects to /git:commit; allows chain + GIT_SKILL_FALLBACK=1 escape
Bad: feedback_git_commit_hook_needed.md — git PreToolUse hook intercepts git add/commit; v0.5.3 command position anchoring + two exceptions + 26 regression tests
Red lines
- Never drop
namecross-links when rewriting — preserve all from the original unless the target is intentionally deleted and the reference is removed in the same pass - Never delete a file referenced by
namein another memory file unless the reference is also removed rmonly under the harness memory directory or.memory/— never elsewhere- Never publish private content to
.memory/(file body or index line)
Consolidate (/memory:consolidate)
User-invoked only. No auto-consolidation. Default failure mode of a weak run is cosmetic tidy while leaving thematic redundancy and factually dead notes. This procedure is fail-closed against that.
Work order: harness first, then sync to .memory/.
CRITICAL: Mutation freeze until planning artifacts exist
Do not Write, Edit, or rm any memory file until all three artifacts exist in this conversation:
- Inventory — complete name list of harness
*.mdand.memory/*.md(including bothMEMORY.md) - Cluster map — every non-index file appears in exactly one theme cluster
- Staleness table — every non-index file has a rubric verdict (step 4)
After ground-truth probes (step 5), also hold a ground-truth table with tool-observed paths (path → found|missing|updated) before applying claim fixes. Fabricating these tables without Read/Grep/find/ls is a failed run.
CRITICAL: Machine validator (cannot self-attest past this)
Write inventory / cluster / staleness / report to temp files, then run:
# Pre-mutation (lift freeze only if exit 0)
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/validate-consolidate.py" \
--inventory /tmp/mem-inventory.txt \
Установить consolidate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditGrepAgentBash(ls:*)Bash(find:*)Bash(wc:*)Bash(diff:*)Bash(cmp:*)Bash(md5:*)Bash(shasum:*)Bash(rm:*)Bash(cp:*)Bash(mkdir:*)Bash(stat:*)Bash(head:*)Bash(sort:*)Bash(comm:*)Bash(python3:*)Bash(mktemp:*)Вложенные файлы
FAQ
Что делает скилл consolidate?
Consolidates project memory across harness and .memory/ with theme clustering, practical-expiry prune, ground-truth verify, and an adversarial second pass. Use when the user runs /memory:consolidate, asks to tidy/dedupe/prune memory, or reports redundant or stale memories. Also covers active writing during work.
Как установить скилл consolidate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл consolidate запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic