context-audit

context-audit is a command for Claude Code from mtvrkan/senior-dev-kit. It costs 29 tokens per session (711 once invoked), scanned A, original, MIT.

A command that measures the files automatically loaded at the start of every coding session and reports their approximate size and largest sections.

In plain words
What is it for?
Use it to audit global and project instructions, rules, and documentation, then decide what should remain always available.
Why use it?
It shows how much fixed context each session consumes and identifies material that could be loaded only when needed, without changing anything first.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the senior-dev-kit plugin — 7 commands, 2 hooks shipped together

Good fit Use it to audit global and project instructions, rules, and documentation, then decide what should remain always available.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add mtvrkan/senior-dev-kit
Claude Code
/plugin install senior-dev-kit

Made for: Claude Code.

Or install senior-dev-kit, the plugin that ships this one along with the rest of its 7 commands, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for context-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/mtvrkan/senior-dev-kit/context-audit/github.svg)](https://agentmods.dev/commands/mtvrkan/senior-dev-kit/context-audit)
Your own site
<a href="https://agentmods.dev/commands/mtvrkan/senior-dev-kit/context-audit"><img src="https://agentmods.dev/badge/commands/mtvrkan/senior-dev-kit/context-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for context-audit

Your own site · 80×15
<a href="https://agentmods.dev/commands/mtvrkan/senior-dev-kit/context-audit"><img src="https://agentmods.dev/badge/commands/mtvrkan/senior-dev-kit/context-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 711 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.00711
Opus 5.5 $0.00012 $0.00284
Sonnet 5.5 $0.00006 $0.00142
Haiku 4.5 $0.00003 $0.00071

Measured 1mo ago against content hash fe25cfd12741, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

context-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude/commands/context-audit.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/context-audit

Answer one question with numbers: what does this setup cost every session, in every project, and which of it is not earning its place? Report first, change nothing until the user approves.

1. Measure

Always loaded in full at session start: the kit's protocol (~/.claude/CLAUDE.md for a copy install; ${CLAUDE_PLUGIN_ROOT}/global-CLAUDE.md when the plugin is active, injected by its SessionStart hook), the project's ./CLAUDE.md and ./.claude/CLAUDE.md (plus any nested ones for files actually read), and rules/*.md whose frontmatter has no paths:. Everything under agent_docs/, paths:-scoped rules and skill bodies load on demand — they are not part of the fixed cost.

for f in ~/.claude/CLAUDE.md "${CLAUDE_PLUGIN_ROOT}/global-CLAUDE.md" ./CLAUDE.md ./.claude/CLAUDE.md ~/.claude/rules/*.md; do
  [ -f "$f" ] || continue
  head -5 "$f" | grep -q '^paths:' && continue
  printf "%-40s lines=%-5s ~tokens=%s\n" "$f" "$(grep -c '' "$f")" "$(( $(wc -c < "$f") / 4 ))"
done

Report the total, and the three largest sections inside the largest file.

2. Judge each block against DOC FRUGALITY (global-CLAUDE.md)

Changes behaviour + not derivable from code/tooling  → keep, always loaded
Reference table, enumeration, procedure detail       → move to agent_docs/*.md, leave a pointer
Restated somewhere else                              → keep one home, delete the copy
Framework default, or a listing a command answers    → delete
Only relevant on an explicit trigger phrase          → lazy doc; the stub names the trigger

3. Contradictions

Two always-loaded lines that disagree cost more than either saves. Report every pair found, with path:line for both, and which one RULE PRECEDENCE (${CLAUDE_PLUGIN_ROOT}/rules/001-conventions.md) makes the winner.

4. Output

FIXED COST: <total> ~tokens/session  (<file> <n> · <file> <n> · …)
MOVE:    <path:line> <what> → agent_docs/<doc>.md   (−<n> tokens/session)
DELETE:  <path:line> <what> — restated at <path:line>
CONFLICT: <path:line> vs <path:line> — <one line>
KEEP:    <anything large that a reader might expect to be cut, and why it stays>

Read the full file on GitHub · 57 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +3 lines fe25cfd12741
  2. 2mo ago First seen · 54 lines · 29 tokens per session scan A d73682433515

Subscribe to this mod's changes

context-audit is a command published in the GitHub repository mtvrkan/senior-dev-kit (11 stars, last pushed 2d ago), licensed MIT. It adds 29 tokens to every session and 711 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-29.

Related

context-audit compared with commands from other repositories

context-audit next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
context-auditmtvrkan/senior-dev-kitCommand112d agoMITA29Claude Code
security-auditsifxprime/kodelyth-eccCommand123d agoMITA25Claude Code
remembrall-helpcukas/remembrallCommand69d agoMITA17Claude Code
lessons-compactfusengine/agentsCommand341mo agoMITA49Claude Code
lessonsfusengine/agentsCommand341mo agoMITA26Claude Code
budgetcukas/remembrallCommand69d agoMITA13Claude Code
carryover5dive-ai/5dive-pluginsCommand2yesterdayApache-2.0A14Claude Code