Context Diet Audit: Slim Down CLAUDE.md, Memory & Skills
Free skill: measures what Claude Code loads each session, flags duplicate, stale and conflicting rules, and proposes a patch applied only on your approval.
Free
Works with the AI Agents you already use
About this skill
What it does
Context Diet Audit looks at everything Claude Code loads at session start: user and project CLAUDE.md files and their @imports, rules files, the memory index and memory files, and installed skill name/description lines. It then:
- Estimates token cost per source (about characters / 4, labeled as an estimate) and ranks them, with an always-loaded total.
- Finds cut candidates: duplicated, stale (flagged only after a check such as a missing path or script fails), verbose, and situational (movable to a path-scoped rules file or nested CLAUDE.md).
- Flags rules that contradict each other, quoting both sides with file and line, and asks you which wins. It never picks silently.
- Proposes a unified-diff patch with each hunk marked SAFE or JUDGMENT CALL, plus before/after token estimates.
Safety by design
- Everything up to the patch is read-only. Nothing is written until you approve specific hunks.
- No network calls, nothing installed.
- Security, secrets, deployment, destructive-action, compliance, and language/format rules are protected and never removed as "duplicate".
- Files outside git get a
.bakcopy first; existing backups are never overwritten. - If your setup is already small, it tells you so and stops.
Who it is for Claude Code users with a CLAUDE.md, memory, or skill list that has grown over time, people hitting usage limits, and anyone who wants to check their instructions for contradictions.
Example use Prompt: "My setup feels bloated, can you slim it down? Aim for under 2k tokens." You get a size table, numbered findings, conflicts to resolve, a labeled patch, and an estimate of the before/after total. Then it asks which hunks to apply.
Limits
- Token counts are estimates; real tokenization varies, especially for non-English text and code.
- Findings are best-effort, not exhaustive, and savings are not guaranteed.
- System prompts, MCP tool definitions, and settings.json are out of scope.
- Not a security review tool and not general prompt-engineering advice.
What is included
SKILL.md: the six-phase workflowreferences/sources.md: where session-loaded instructions livereferences/heuristics.md: detection patterns and tightening examplesreferences/report-template.md: report and post-apply summary format
Requirements
- Claude Code or another client that supports Agent Skills
- Tools: Read, Glob, Grep, Bash (read-only commands such as
wc,ls,git status), Edit, Write - License: MIT
Token counts are estimates. Does not perform security audits. Requires manual approval before writing files. Stale path verification is limited to local filesystem and git records.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 19 days ago
- Free with an Agensi account
Requires