Context Diet Audit: Slim Down CLAUDE.md, Memory & Skills

    1

    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

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    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:

    1. Estimates token cost per source (about characters / 4, labeled as an estimate) and ranks them, with an always-loaded total.
    2. 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).
    3. Flags rules that contradict each other, quoting both sides with file and line, and asks you which wins. It never picks silently.
    4. 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 .bak copy 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 workflow
    • references/sources.md: where session-loaded instructions live
    • references/heuristics.md: detection patterns and tightening examples
    • references/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

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    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 to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 19 days ago

    • Free with an Agensi account

    Software
    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed19 days ago

    What's inside

    Frequently Asked Questions

    This skill targets Claude Code environments, specifically auditing `CLAUDE.md` files, memory indexes, and nested directory instructions to reduce session latency and token costs.

    No, the skill generates a categorized diff report first, labeling changes as 'SAFE' or 'JUDGMENT CALL.' You must manually approve specific patches before any files are modified.

    It uses a 'Safe Patching' workflow that creates `.bak` files and checks your local `git status` before writing updates, ensuring you can easily roll back if needed.

    While standard prompts can summarize text, this skill uses filesystem utilities to recursively track `@path` imports and verify if referenced files actually exist, tasks that LLMs cannot reliably perform on their own.

    The audit provides character counts and estimated token usage for every instruction source, allowing you to rank and target the largest contributors to your context bloat.

    New in LLM Ops

    Free