Audit Claude Code CLAUDE.md memory files for quality, compliance, and organization.
Audits CLAUDE.md memory files for quality, compliance, and organization across all scopes.
/plugin marketplace add melodic-software/claude-code-plugins/plugin install claude-code-observability@melodic-softwareAudit Claude Code CLAUDE.md memory files for quality, compliance, and organization.
Before auditing, initialize the environment:
Get the current UTC date, capture the project root path, ensure the temp directory exists, and clean up stale audit files. The memory-management skill provides authoritative validation guidance (auto-loaded when this command runs).
@path/to/file.md)| Argument | Description |
|---|---|
| (none) | Audit all discoverable CLAUDE.md files |
project | Only audit project-level files |
user | Only audit ~/.claude/CLAUDE.md |
all | Audit all scopes explicitly |
--force | Audit regardless of modification status |
Check root CLAUDE.md, .claude/CLAUDE.md, user ~/.claude/CLAUDE.md (Unix) or %USERPROFILE%\.claude\CLAUDE.md (Windows), and .claude/memory/*.md.
Build list with scope and level (root/dot-claude/memory/user).
Parse scope selector and --force flag. Filter files to match requested scope.
Display mode, files discovered, primary files, and imported memory files.
For each file, spawn the memory-auditor subagent with scope, level, path, and last audit date. Run in parallel batches of 3-5.
After individual audits, perform cross-file circular import detection by building an import graph.
Subagents write findings to .claude/temp/. The main conversation thread collects results and updates audit logs using its Write/Edit tools.
Report total audited by scope, results, circular import check, and details tables. Provide remediation steps for issues.
Valid: @path/to/file.md (e.g., @.claude/memory/workflows.md)
CLAUDE.md).claude/CLAUDE.md)~/.claude/CLAUDE.md - lowest)| File Type | Recommended Size |
|---|---|
| Root CLAUDE.md | < 50 lines core + imports |
| Memory imports | < 500 lines each |
| Platform | User Memory |
|---|---|
| Unix | ~/.claude/CLAUDE.md |
| Windows | %USERPROFILE%\.claude\CLAUDE.md |
All audit results are written to .claude/audit/memory.md.
Use /audit-log memory to view current audit status.
User: /audit-memory
Claude: Discovering CLAUDE.md files...
## Audit Plan
**Mode**: SMART
**Files discovered**: 12
### Primary Files:
1. [project:root] CLAUDE.md
2. [user] ~/.claude/CLAUDE.md
### Imported Files:
3. [project:memory] .claude/memory/workflows.md
...
[Spawns memory-auditor subagents]
## Audit Complete
**Circular Import Check**: ✓ No cycles detected
| Scope | File | Result | Score |
| --- | --- | --- | --- |
| project | CLAUDE.md | PASS | 100/100 |
User: /audit-memory project
Claude: Auditing project-level files...