Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 94
  • 34k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-audit

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install context-audit in Claude Code

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

A

No 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 →

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.

context-audit Install

Add to stack

Loading.