solo-memory-audit
Skill18 starsChanged 4 months agoMITView on GitHub
Use when "audit memory", "check CLAUDE.md", "memory map", "rules audit", "context budget", "what loads in my session", or need to optimize agent context loading.
In this repository62 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- solo-android-releaseSkill
- solo-apple-app-iconSkill
- solo-auditSkill
- solo-boardSkill
- solo-buildSkill
- solo-community-outreachSkill
- solo-content-genSkill
- solo-creator-growthSkill
- solo-customer-finderSkill
- solo-deep-researchSkill
- solo-deploySkill
- solo-diagnoseSkill
- solo-domainSkill
- solo-factorySkill
- solo-github-outreachSkill
- solo-gmail-cliSkill
- solo-grillSkill
- solo-hackathonSkill
- solo-humanizeSkill
- solo-i18nSkill
- solo-index-youtubeSkill
- solo-initSkill
- solo-ios-devSkill
- solo-ios-releaseSkill
- solo-kaggle-gpuSkill
- solo-kindleSkill
- solo-knowledgeSkill
- solo-landing-genSkill
- solo-launchSkill
- solo-legalSkill
- solo-metrics-trackSkill
- solo-mirrorSkill
- solo-model-shrinkSkill
- solo-music-reels-cutSkill
- solo-open-datasetSkill
- solo-paperSkill
- solo-pdf-printSkill
- solo-pipelineSkill
- solo-planSkill
- solo-redditSkill
- solo-researchSkill
- solo-retroSkill
- solo-reviewSkill
- solo-scaffoldSkill
- solo-secretsSkill
- solo-seo-auditSkill
- solo-seo-cliSkill
- solo-setupSkill
- solo-sgrSkill
- solo-skill-auditSkill
- solo-skill-shelfSkill
- solo-stem-splitSkill
- solo-streamSkill
- solo-supervoxSkill
- solo-swiftui-design-systemSkill
- solo-transcribeSkill
- solo-validateSkill
- solo-video-editSkill
- solo-video-promoSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 43
If all argument, add --all-projects flag instead of path.
- Very specific: line 45
If uv is not available, fall back to:
- Distinctive: line 50
Analyze the output: Read the tree display and audit hints table.
- Distinctive: line 70
Verify parent CLAUDE.md files exist (inheritance chain intact)
- Distinctive: line 71
Check that project CLAUDE.md has essential sections (structure, commands, stack)
- Very specific: line 72
Verify .claude/rules/ files have valid paths: frontmatter syntax
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/memory-audit
Audit Claude Code memory hierarchy for a project. Shows what files load at session start, total context budget, and optimization hints.
Context
Claude Code loads memory files at session start in this order:
- Managed policy (
/Library/Application Support/ClaudeCode/CLAUDE.md) - User memory (
~/.claude/CLAUDE.md) - User rules (
~/.claude/rules/*.md) - Auto-memory (
~/.claude/projects/{key}/memory/MEMORY.md, first 200 lines) - Project hierarchy (walk from
/to CWD:CLAUDE.md,.claude/CLAUDE.md,.claude/rules/*.md) - Local overrides (
CLAUDE.local.mdat each level)
Rules with paths: frontmatter are conditional — loaded only when working on matching files. Rules without paths: always load and consume context budget.
Target: keep startup context under 40k chars. Large CLAUDE.md files should extract domain-specific sections into conditional .claude/rules/*.md files.
Steps
- Determine target. Parse
$ARGUMENTS:- Empty or
.-> use CWD - Path -> use that path
all-> scan CWD subdirectories that have CLAUDE.md
- Empty or
Run memory_map.py. Execute:
uv run python ${CLAUDE_PLUGIN_ROOT}/scripts/memory_map.py <path> --auditIf
allargument, add--all-projectsflag instead of path.If
uvis not available, fall back to:python ${CLAUDE_PLUGIN_ROOT}/scripts/memory_map.py <path> --audit --plain- Analyze the output. Read the tree display and audit hints table. Key metrics:
- Total startup chars — should be under 40k
- Large files (>300 lines) — candidates for splitting into rules
- Unconditional rules (>30 lines, no
paths:frontmatter) — addpaths:to make conditional - Duplicate sections — same
## Headerin multiple files, extract to one place - Missing auto-memory — project doesn't learn across sessions
Generate recommendations. Based on audit hints, suggest concrete actions:
Issue Action File > 300 lines Extract domain sections to .claude/rules/{topic}.mdwithpaths:frontmatterTotal > 40k chars Identify largest files, move conditional content to rules Unconditional rule > 30 lines Add paths:frontmatter targeting relevant source filesDuplicate sections Keep in the highest-level file, remove from children No auto-memory Normal for new projects, just informational User-level rule is project-specific Move from ~/.claude/rules/to project's.claude/rules/Generic rule in project Move up to ~/.claude/rules/or parent CLAUDE.md- Check hierarchy health. For the target project:
- Verify parent CLAUDE.md files exist (inheritance chain intact)
- Check that project CLAUDE.md has essential sections (structure, commands, stack)
- Verify
.claude/rules/files have validpaths:frontmatter syntax
- Output report:
## Memory Audit Report **Project:** [path] **Startup context:** X files, ~Y chars (Z% of 40k budget) ### Tree [paste tree output from memory_map.py] ### Issues Found [from audit hints] ### Recommendations 1. [specific action with file path] 2. [specific action with file path] ### Hierarchy Health - Inheritance chain: [OK / broken at level X] - Auto-memory: [present / missing] - Rules: X total (Y conditional, Z always-on)
Rules Frontmatter Reference
Conditional rules load only when the agent works on files matching the glob pattern:
---
paths:
- "src/lib/analytics/**"
- "src/app/api/analytics/**"
---
# Analytics Module
...content only loaded when working on analytics files...Without paths:, the rule always loads and consumes context budget.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

