context-audit
Skill by garrytan
Audits the always-loaded context files an AI assistant reads every turn, such as CLAUDE.md, AGENTS.md and MEMORY.md. It returns a report-only, ranked list of token savings, contradictions and skill-extraction candidates.
Install context-audit
Built from the published package, never by AI.
git clone --depth 1 https://github.com/garrytan/gbrain /tmp/gbrain && mkdir -p ~/.claude/skills && cp -r /tmp/gbrain/skills/context-audit ~/.claude/skills/context-auditRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/garrytan/gbrain /tmp/gbrain && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/gbrain/skills/context-audit ~/.gemini/antigravity-cli/skills/context-auditAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
Context Audit is an agent skill that measures the files an AI assistant loads on every turn, including CLAUDE.md, AGENTS.md, MEMORY.md and bootstrap-rendered identity files. It estimates token counts from file size, then reads each file and looks for redundancy, contradictions, stale content, compression candidates and content that belongs in an on-demand skill. Each finding gets a risk class, evidence and a ranked action list sorted by token savings.
The skill never edits audited files. Recommendations for rendered identity files point to the interview answer bank or templates instead. Judging runs through the gbrain eval cross-modal command, using one cheap model by default. It is written for users who want to reduce the per-turn context cost of their assistant setup.
Written from the project's SKILL.md and checked against it.
What it can do
- Stack enumerationLists the always-loaded files for the current harness and measures each file's size in bytes and estimated tokens.
- Drift trackingCompares the current stack total with a prior audit report stored in the brain to show growth or shrinkage.
- Six-dimension analysisChecks token efficiency, redundancy, contradictions, skill-worthiness, staleness and clarity across the stack.
- Risk classificationLabels each finding as zero risk, low risk or medium risk to show how much care the change needs.
- Cross-modal judgingGates the draft report through gbrain eval cross-modal before delivery, with a single cheap model by default.
- Ranked action listProduces a table sorted by token savings, with evidence quotes and where each fix belongs.
What you need
- gbrain CLI with the eval cross-modal command
- A configured utility-tier model and provider key for judging
- Access to the always-loaded context files in the project or harness
Try asking
- Run a context audit on my CLAUDE.md and AGENTS.md files
- Audit my context stack and show the top token savings
- Check my context stack for contradictions and stale content
Good to know
- Report-only: it never edits any audited file, including zero-risk deletions.
- Token figures are estimates based on bytes divided by 2.8 unless the host reports an exact total.
- The full multi-model panel runs only on explicit request and costs about three times or more per cycle.
- Recommendations for rendered identity files must go through the answer bank or templates and a re-render.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/context-audit/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md12 KB -
routing-eval.jsonl2 KB
Alternatives to context-audit
All alternatives →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
Compare with agent-reproduce-align, google_contacts or m06-error-handling
context-audit: common questions
Does context-audit change my CLAUDE.md or MEMORY.md files?
No. The source says the skill is report-only and never edits any audited file. It only lists recommended fixes for the user to apply.
How are the token counts calculated?
The source says token figures come from file byte counts divided by 2.8, and the report prints that divisor. A host-reported exact per-category context figure takes priority when available.
Which model is used to judge the audit?
By default, one cheap utility-tier model from the user's model config is used through gbrain eval cross-modal. The full three-provider panel runs only if the user explicitly asks for a full or multi-model audit.
How do I install context-audit?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is context-audit free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is context-audit safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to context-audit?
Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.
