بنقرة واحدة
audit-memory
Audit all Claude memory and documentation files for staleness, symbol accuracy, and context budget.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Audit all Claude memory and documentation files for staleness, symbol accuracy, and context budget.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | audit-memory |
| description | Audit all Claude memory and documentation files for staleness, symbol accuracy, and context budget. |
| disable-model-invocation | true |
Perform a comprehensive documentation health audit across all Claude context files.
Glob all documentation files and build a summary table:
CLAUDE.md (root)cmd/*/CLAUDE.md, internal/*/CLAUDE.md, test/*/CLAUDE.md, and pkg/*/CLAUDE.md.claude/rules/*.md.claude/docs/*.md.serena/memories/*.mddocs/docs.json, docs/custom.css, docs/favicon.svg — Mintlify site config, theme, and favicondocs/*.mdx — Hand-authored Mintlify pagesdocs/cli-reference/*.md — Auto-generated CLI reference (never edit directly; generated via Makefile, freshness checked in CI)For each file, report: path, line count (wc -l), estimated tokens (wc -c / 4).
Group into categories:
CLAUDE.md, .claude/rules/*.md without paths: frontmatter.claude/rules/*.md with paths: frontmatter (loaded only when matching files touched)cmd/*/CLAUDE.md, internal/*/CLAUDE.md, test/*/CLAUDE.md, pkg/*/CLAUDE.md.claude/docs/*.md.serena/memories/*.mddocs/docs.json, docs/custom.css, docs/*.mdx, docs/cli-reference/*.mdRun the freshness script and include its output:
bash scripts/check-claude-freshness.sh --no-color
For each cmd/*/CLAUDE.md, internal/*/CLAUDE.md, test/*/CLAUDE.md, and pkg/*/CLAUDE.md:
[A-Z][A-Za-z0-9]* — exported symbols)*.go files in the same directory^func [A-Z], ^type [A-Z], ^var [A-Z], ^const [A-Z]) in the directory not mentioned in the CLAUDE.md. Exclude Test* and Benchmark* functions — these don't belong in CLAUDE.md.For each .claude/rules/*.md file with a paths: frontmatter field:
paths: ["glob1", "glob2"]git ls-files '<glob>' for each patternpaths: frontmatter — these are always-loaded and should be scoped if possibleCheck the auto memory directory (~/.claude/projects/*/memory/):
.md files in the directory. Flag any not referenced in MEMORY.md (unindexed).(filename.md) reference in MEMORY.md points to an existing file.project_*.md and firewall_*.md file. Flag those whose descriptions no longer match reality (e.g., "ready for planning" when work is complete).currentDate or hardcoded date blocks in MEMORY.md — these rot.MEMORY.md exceeds 200 lines (only first 200 loaded per session).docs/docs.json navigation groups reference files that actually exist in docs/ and docs/cli-reference/docs/*.mdx) that reference outdated commands or config keys (spot-check against .clawker.yaml schema and CLI command tree)docs/cli-reference/*.md for content accuracy — they are auto-generatedRead each .serena/memories/*.md file and flag:
git log --format=%at -1)Check for contradictions between always-loaded context files:
~/.claude/CLAUDE.md): Check for conflicting behavioral directives (e.g., "pivot on tech debt" vs "surgical changes only")..claude/docs/*.md files:
Report totals against budgets:
| Category | Budget | Actual |
|---|---|---|
| Root CLAUDE.md + always-loaded rules (no paths:) | < 500 lines | ? |
| Total always-loaded (root + rules + global) | < 800 lines | ? |
| Each individual CLAUDE.md | < 200 lines | ? |
Flag any files exceeding their budget.
Output a prioritized action list using these categories:
paths: frontmatterinternal/ or pkg/ with significant Go files but no CLAUDE.mdFormat each recommendation as:
[ACTION] path/to/file — reason
Sort by priority: DELETE > FIX > UPDATE > TRIM > SCOPE > ADD.