From claude-memory
Audit the Claude Code instruction/memory layer — CLAUDE.md, CLAUDE.local.md, .claude/rules/, and auto-memory — against a codified checklist derived from official Claude Code documentation. Use when: 'audit CLAUDE.md', 'memory health', 'audit rules', 'is my CLAUDE.md too long', 'prune instructions', after CLAUDE.md/rules changes or a Claude Code upgrade; actions: audit (default), fix, update, report.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-memory:audit [audit|fix|update|report] — default: audit[audit|fix|update|report] — default: auditThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Memory files: !`d=$(bash "${CLAUDE_PLUGIN_ROOT}/skills/audit/scripts/resolve-memory-dir.sh" 2>/dev/null); ls "$d"/*.md 2>/dev/null | wc -l | tr -d '\r' || echo "0"`
Memory files: !d=$(bash "${CLAUDE_PLUGIN_ROOT}/skills/audit/scripts/resolve-memory-dir.sh" 2>/dev/null); ls "$d"/*.md 2>/dev/null | wc -l | tr -d '\r' || echo "0"
MEMORY.md lines: !d=$(bash "${CLAUDE_PLUGIN_ROOT}/skills/audit/scripts/resolve-memory-dir.sh" 2>/dev/null); test -f "$d/MEMORY.md" && wc -l < "$d/MEMORY.md" | tr -d '\r' || echo "0"
Rules files: !find .claude/rules -name "*.md" 2>/dev/null | wc -l | tr -d '\r' || echo "0"
CLAUDE.md lines: !test -f CLAUDE.md && wc -l < CLAUDE.md | tr -d '\r' || echo "0"
CLAUDE.local.md exists: !test -f CLAUDE.local.md && echo "yes" || echo "no"
Orphan always-loaded rules (RD1): !bash "${CLAUDE_PLUGIN_ROOT}/skills/audit/scripts/orphan-rule-check.sh" --count 2>/dev/null || echo "?"
MEMORY.md index issues (M2): !bash "${CLAUDE_PLUGIN_ROOT}/skills/audit/scripts/memory-index-refs-check.sh" --count 2>/dev/null || echo "?"
Deterministic health check for the Claude Code instruction/memory layer. Audits files YOU write that
shape Claude's behavior — not the entire context window (MCP tools, agents, and skills are covered by
the audit and automation-gaps skills in the claude-config plugin).
| Entity | Location | Loaded | Audited here |
|---|---|---|---|
| Project instructions | CLAUDE.md | Every session, full | Yes |
| Local overrides | CLAUDE.local.md | Every session, full | Yes |
| Rules | .claude/rules/**/*.md | Every session (unconditional) or on-demand (path-scoped) | Yes |
| Auto-memory | ~/.claude/projects/<project>/memory/ | First 200 lines of MEMORY.md | Yes |
| Settings, hooks, MCP, agents, skills | Various | Various | No — use claude-config's audit / automation-gaps |
| Argument | Action |
|---|---|
(none) or audit | Run the full codified checklist against all instruction/memory files |
update | Research current official docs, refresh criteria and official-guidance reference files |
fix | Apply fixes for audit findings (requires prior audit, asks for approval) |
report | Show last audit results without re-running |
The checklist at reference/criteria.md is codified, not a subjective rubric.
Its deterministic spine (C1 line budget, M1 index size, the script-backed M2 index integrity and
RD1 orphan-rule checks) yields byte-identical findings on the same repo state; its judgment tier
(C2-C8, R1-R4, M3-M4) applies fixed criteria with model reading, so findings vary in wording though
not in criteria — label those "judgment candidate" in the report. Criteria derive from official Claude
Code documentation (sourced quotes in reference/official-guidance.md);
refresh both via the update action.
Load context/audit.md for the full audit workflow.
Load context/update.md for the research-and-refresh workflow.
Load context/fix.md for the fix-with-approval workflow.
Read the most recent audit report from ${CLAUDE_PLUGIN_DATA}/audit/last-audit.md. If
missing, first check the pre-rename location ${CLAUDE_PLUGIN_DATA}/health/last-audit.md
(this skill was previously named health) and move that directory to the new name when
found; only when neither exists, inform the user no audit has been run yet and suggest
running the audit.
Audit output is contributor-local by design. Reports audit a contributor's personal auto-memory
(~/.claude/projects/<project>/memory/), which varies per team member — so they persist in the
plugin's own data directory, never in the consuming repo.
This skill ships the doc-derived checklist only. A consuming repo that layers its own
instruction-hygiene conventions (e.g. a team-shared-first codification policy, an always-loaded
context-budget policy, or an exemption from the 200-line CLAUDE.md target for repos that deliberately
run a large rules layer) declares them in its own CLAUDE.md / .claude/rules/ — read those files
during the audit and apply any additional criteria or documented exemptions they define, reporting
such findings under a REPO check-ID so they stay distinct from the doc-derived checks.
If the claude-md-management plugin is installed, its claude-md-improver skill audits CLAUDE.md
structure and content quality (complementary to this health check — run this audit FIRST to identify
issues), and revise-claude-md captures session learnings after a fix pass. Absent that plugin, the
fix mode here stands on its own.
npx claudepluginhub melodic-software/claude-code-plugins --plugin claude-memoryGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Dispatches multiple subagents concurrently for independent tasks without shared state. Use when facing 2+ unrelated failures or subsystems that can be investigated in parallel.