claude-memory-curator
Curate and clean up Claude Code instructions and memory files.
Install
mkdir -p .claude/skills/claude-memory-curator && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17001" && unzip -o skill.zip -d .claude/skills/claude-memory-curator && rm skill.zipInstalls to .claude/skills/claude-memory-curator
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Audit, review, clean up, and prune Claude Code durable context. Use when the user asks about CLAUDE.md, CLAUDE.local.md, .claude/rules, user Claude rules, Claude Code auto memory, /memory, stale instructions, memory pollution, sensitive context, settings such as autoMemoryEnabled or claudeMdExcludes, or where a Claude instruction should live. Do not use for Codex memory, Cursor rules, Claude app memory, Anthropic API Memory Stores, or generic docs cleanup.Key capabilities
- →Audit Claude Code durable context
- →Review Claude Code instruction files
- →Clean up stale or conflicting Claude instructions
- →Propose better destinations for Claude context entries
- →Scan for sensitive context in Claude memory
How it works
The skill inventories Claude context files, scans for risks like sensitive or stale entries, classifies atomic claims, and proposes actions based on predefined rules and precedence.
Inputs & outputs
When to use claude-memory-curator
- →Cleaning CLAUDE.md
- →Pruning memory pollution
- →Updating local instructions
About this skill
Claude Memory Curator
Goal
Audit Claude Code durable context as user-owned agent state: expose stale, unsafe, duplicated, over-broad, conflicting, misplaced, or unenforceable entries; propose better destinations; and route review, planning, persistence, and cleanup through one explicit contract.
Keep the subject scoped to Claude Code surfaces: CLAUDE.md, CLAUDE.local.md, conditionally loaded AGENTS.md, .claude/rules/, user-level Claude rules, settings, hooks, managed policy evidence, and auto memory files. Do not treat this as a Codex, Cursor, Claude app, or Anthropic API Memory Stores curator.
When to use
- Use for review, placement, planning, or cleanup of the Claude Code durable surfaces named in the description.
- Use when those surfaces are stale, conflicting, sensitive, over-broad, ignored, or causing Claude to reuse old guidance.
When not to use
- Do not use for Codex, Cursor, Claude web/app, Anthropic API Memory Stores, generic prompt engineering, or repo-doc cleanup without Claude durable context.
- Keep review requests read-only. Treat managed policy, including
/etc/claude-code/CLAUDE.mdandmanaged-settings.json, as read-only unless exact edit authority is explicit.
Workflow selection
Expose all eight workflows in this stable order, compactly when intent is clear. Recommend the route matching the requested outcome and delivery; for a bare invocation recommend review-chat while asking the user to choose:
| Workflow | Delivery and result |
|---|---|
plan-run-cleanup-file | One record: review, approved plan, backup, cleanup, verification. |
review-chat | Chat: read-only review and recommendations. |
review-file | One record: read-only review and recommendations. |
cleanup-chat | Chat and backup: review, high-confidence atomic cleanup, verification. |
cleanup-file | One record and backup: review, high-confidence atomic cleanup, verification. |
plan-cleanup-chat | Chat: review and approved plan; no cleanup. |
plan-cleanup-file | One record: review and approved plan; no cleanup. |
plan-run-cleanup-chat | Chat and backup: review, approved plan, cleanup, verification. |
Route from intent instead of adding an auto workflow:
- Direct review defaults to
review-chat; explicit persistence selectsreview-file. - Explicit cleanup without a delivery preference selects
plan-run-cleanup-file. - A clear direct request may select another matching route when delivery and execution intent are explicit.
- Agent-initiated activation may select only a relevant read-only route. Use
review-fileonly when the existing task already requests persistence; never infer cleanup. - A bare invocation, conflicting cues, or ambiguity about review versus cleanup, chat versus file, execution, target paths, or mutation authority exposes the table and asks the user to choose.
- A mutating route may be selected only when the user already requested cleanup of the identified Claude context scope.
Before substantive inspection, disclose the complete finite options once and state Selected, Reason, target paths, write scope, expected artifacts, protected state, Plan-mode capability, and unresolved approvals. Reuse facts and exact authority already established in the task; combine known fields into a short announcement. If selection is unambiguous, announce it and proceed. If it is ambiguous, stop before inventory and ask only the unresolved choice. Do not repeat the selector or ask for an unchanged selection again.
Workflow selection does not authorize whole-file deletion, destructive recovery, managed-policy edits, paid or external actions, deployment, publication, or scope expansion.
Inputs to inspect
- When
AGENTS.mdis relevant, readreferences/context-surface-anatomy.md. Inventory presence separately from effective loading: confirm Claude version, provider/feature availability, settings, hook/plugin restrictions, and session loading evidence. Keep a working@AGENTS.mdimport for older or restricted hosts. - Resolve the repo, Claude home, configured auto-memory directory, and only the applicable project/user instruction, rule, setting, hook, managed-policy, and memory surfaces.
- Inspect current repository evidence only as needed to verify a disputed claim.
- Load the placement, classification, conflict, enforcement, and safe-editing references below only when their decision is active. Load the report or plan asset whenever producing that artifact.
Workflow
Every route applies the same review quality to the explicitly requested scope before planning or cleanup. A request about one file or claim does not authorize inspecting the entire store: use targeted reads instead of whole-root inventory/scanner commands, and consult other evidence only to resolve an in-scope conflict. Delivery never reduces review quality:
-
Resolve the selected route, target repo, Claude home, auto-memory path, persistence path when applicable, and protected state.
-
Inventory Claude context without dumping contents:
node scripts/inventory-claude-memory.mjs --repo .Add
--claude-home PATHor--memory-dir PATHwhen the user provides non-default locations. Use--jsonwhen structured evidence is useful. -
Run the redacted risk scanner when looking for sensitive, stale, broad, local, repo-specific, ignored, or conflict-prone entries:
node scripts/scan-claude-memory-risks.mjs --repo . --jsonExit code
1means findings were found, not that the scan failed. Summarize counts and highest-signal redacted findings instead of pasting the full payload. -
Parse
.claude/rules/**/*.mdfrontmatter forpathsso path-scoped guidance is not treated like always-loaded guidance. -
Inspect visible settings for
autoMemoryEnabled,autoMemoryDirectory,claudeMdExcludes, permission rules, and hooks when they affect placement. -
Treat managed policy files and managed settings as higher-precedence read-only evidence by default.
-
Treat
MEMORY.mdas the auto-memory entrypoint. Treat topic files as on-demand detail unless the user asks to audit the whole memory directory. -
Read context files in bounded chunks and redact sensitive values.
-
Extract one atomic claim per row. Split compound entries before classification.
-
Verify disputed claims against only the repo files needed for the dispute. Load
references/conflict-resolution.mdwhen precedence is unclear. -
Assign exactly one primary classification per atomic claim:
KEEP,KEEP BUT REWRITE,MOVE TO CLAUDE.md,MOVE TO CLAUDE.local.md,MOVE TO CLAUDE RULE,MOVE TO AUTO MEMORY TOPIC,MOVE TO AGENTS.md,MOVE TO REPO DOCS,MOVE TO SKILL,MOVE TO SETTINGS,MOVE TO HOOK,MOVE TO MANAGED POLICY,DELETE, orASK USER. -
Tag high-risk entries as useful context only:
stale,duplicated,too-broad,too-specific,repo-specific,workflow,config,sensitive,conflicting,unenforced,managed-policy, oruseful. -
Add confidence (
high,medium, orlow) and a proposed action to every entry. -
Produce the complete review before planning or editing. Route delivery must not reduce review quality or expand the requested scope.
Route execution
review-chat: return the review in chat and create no durable curation report.review-file: persist the single curation record and make no context change.cleanup-chat: derive only high-confidence atomic actions from the completed review, back up every exact file to be changed, apply them, re-read changed sections, and report verification in chat. Create no durable curation report.cleanup-file: create the curation record before mutation; if persistence fails, stop. Then back up exact files, apply only high-confidence atomic actions, and complete the same record with execution and verification.plan-cleanup-chatandplan-cleanup-file: enter the Plan lifecycle, resolve the cleanup plan with the user, and stop after approval without changing Claude context.plan-run-cleanup-chatandplan-run-cleanup-file: enter the Plan lifecycle, resolve and approve the complete cleanup plan, recheck state, exit Plan mode, back up exact files, execute only the unchanged plan, and verify. Do not ask a generic second cleanup question after plan approval.
Direct cleanup (cleanup-chat or cleanup-file) is limited to high-confidence atomic edits, moves, or entry deletion in existing, editable, runtime-owned Claude context. Defer whole-file deletion, shared AGENTS.md, new context files, settings, hooks, managed policy, AGENTS.md, repository docs, skills, UI-only User/Team settings, uncertain schemas, medium/low-confidence changes, and any scope expansion. A plan-run route may execute broader curation changes only when the approved plan names each destination, write path, backup, rollback, and separate approval boundary.
Plan lifecycle
Respect active/requested native Plan mode and actual write permissions on every route: no report, backup, or cleanup write while Plan is active or permission is unknown. Planning may continue read-only without a manual mode switch. For plan-* routes or pending material questions, read references/plan-lifecycle.md. Reuse unchanged approval; mode exit alone is not approval, and unanswered questions grant no authority. Recheck state before writes and reconfirm only material changes. Plan-only routes never authorize cleanup.
Do not invoke claude-spec-interviewer inside this curation workflow. If findings require a broader durable rule, r
Content truncated.
When not to use it
- →For Codex memory cleanup
- →For Cursor rules or context cleanup
- →For Claude web/app account memory or Anthropic API Memory Stores
Limitations
- →Does not modify files when only review is requested
- →Does not edit managed policy files by default
- →Requires explicit approval for cleanup actions
How it compares
This skill specifically targets Claude Code's durable context, providing a structured approach to managing its unique instruction files and memory, unlike generic documentation or prompt engineering.
Compared to similar skills
claude-memory-curator side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| claude-memory-curator (this skill) | 0 | 3mo | Review | Intermediate |
| notion-knowledge-capture | 10 | 11mo | No flags | Intermediate |
| feishu-doc | 14 | 7mo | No flags | Intermediate |
| openspec-continue-change | 4 | 8mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
notion-knowledge-capture
makenotion
Transforms conversations and discussions into structured documentation pages in Notion. Captures insights, decisions, and knowledge from chat context, formats appropriately, and saves to wikis or databases with proper organization and linking for easy discovery.
feishu-doc
openclaw
Feishu document read/write operations. Activate when user mentions Feishu docs, cloud docs, or docx links.
openspec-continue-change
studyzy
通过创建下一个产出物继续处理 OpenSpec 变更。当用户想要推进其变更、创建下一个产出物或继续其工作流程时使用。
kimi-cli-help
MoonshotAI
Answer Kimi Code CLI usage, configuration, and troubleshooting questions. Use when user asks about Kimi Code CLI installation, setup, configuration, slash commands, keyboard shortcuts, MCP integration, providers, environment variables, how something works internally, or any questions about Kimi Code CLI itself.
openspec-archive-change
studyzy
归档实验性工作流中已完成的变更。当用户想要在实现完成后最终确定并归档变更时使用。
feishu-perm
m1heng
Feishu permission management for documents and files. Activate when user mentions sharing, permissions, collaborators.