plugins/claude-ecosystem/skills/audit-memory/SKILL.md
Audit Claude Code CLAUDE.md memory files for quality, compliance, and organization. Use to validate import syntax, detect circular imports, and check hierarchy compliance.
npx skillsauth add melodic-software/claude-code-plugins audit-memoryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Audit 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 |
| --skip-validation | Skip finding validation (faster, but may include false positives) |
| --token-budget | Run ONLY token budget analysis (skip full audit) |
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-component-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.
Unless --skip-validation flag is present:
audit-finding-validator agent with:
project_root: The captured project root pathaudit_type: "memory"audit_files: List of .claude/temp/audit-*-memory-*.json file paths.claude/temp/audit-filtered-findings.jsonIf --skip-validation flag is present:
Report total audited by scope, results, circular import check, and details tables. Provide remediation steps for issues.
Include validation statistics (if validation was performed):
Scope: Only always-loaded files (root CLAUDE.md + files with @-prefix imports marked as "Always-loaded")
Note: Use --token-budget to run ONLY this step (skips Steps 1-5 full audit).
Invoke memory-management skill (which delegates to docs-management) to fetch current official guidance on memory file sizing. Official docs recommend keeping memory "concise and focused" with progressive disclosure - specific token thresholds are repo-specific standards, not official requirements.
For each always-loaded file:
len(content) / 4 (approximate for English markdown)**Token Budget:** ~1,800 tokens)Sum all always-loaded file tokens. Do NOT include on-demand files (those without @ prefix in root, or marked "Context-Dependent").
These thresholds are repo-specific standards (see audit-framework.md), NOT from official Claude Code docs:
| Status | Token Range | Guidance | | --- | --- | --- | | PASS | ≤12k tokens | Within repo budget | | WARN | 12k-15k tokens | At upper limit, monitor | | FAIL | >15k tokens | Over budget, remediation needed |
Report includes:
If over budget, recommend:
Add Token Budget Analysis section to .claude/audit/memory.md with:
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-component-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...
development
Search Milan Jovanovic's .NET blog for Clean Architecture, DDD, CQRS, EF Core, and ASP.NET Core patterns. Use for finding applicable patterns, code examples, and architecture guidance. Invoke when working with .NET projects that could benefit from proven architectural patterns.
tools
Install and configure Data API Builder (DAB) for production SQL Server MCP access with RBAC
tools
Manage MssqlMcp servers - status, rebuild, and upstream updates
tools
Developer environment setup guides for Windows, macOS, Linux, and WSL. Use when setting up development machines, installing tools, configuring environments, or following platform-specific setup guides. Covers package management, shell/terminal, code editors, AI tooling, containerization, databases, and more.