mk:context-audit

mk:context-audit is a skill for Claude Code from ngocsangyem/MeowKit. It costs 24 tokens per session (1,024 once invoked), scanned A, original, MIT.

A read-only checker for the structural overhead in a project’s .claude/ files. It estimates how much of the model’s context window those always-loaded files consume and suggests what to trim.

In plain words
What is it for?
Use it before adding agent configuration, after context quality degrades, or during periodic project health checks.
Why use it?
It helps explain why coding-agent sessions may feel slow, distracted, or repeatedly compressed. It separates context-window usage from monetary cost and transcript length.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Good fit Use it before adding agent configuration, after context quality degrades, or during periodic project health checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ngocsangyem/meowkit/context-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ngocsangyem/MeowKit --skill context-audit
Clone the repo
git clone --depth 1 https://github.com/ngocsangyem/MeowKit

Made for: Claude Code.

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 mk:context-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/ngocsangyem/meowkit/context-audit/github.svg)](https://agentmods.dev/skills/ngocsangyem/meowkit/context-audit)
Your own site
<a href="https://agentmods.dev/skills/ngocsangyem/meowkit/context-audit"><img src="https://agentmods.dev/badge/skills/ngocsangyem/meowkit/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 mk:context-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/ngocsangyem/meowkit/context-audit"><img src="https://agentmods.dev/badge/skills/ngocsangyem/meowkit/context-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,024 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.00024 $0.01024
Opus 5.5 $0.00010 $0.00410
Sonnet 5.5 $0.00005 $0.00205
Haiku 4.5 $0.00002 $0.00102

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

Security

Grade A, and why

mk: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 10d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/estimate-tokens.sh, scripts/format-audit-report.sh, scripts/inventory-context.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/skills/context-audit/SKILL.md · 101 lines

How it starts

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

/mk:context-audit — Context Window Structural Audit

Read-only audit of .claude/ structural overhead. Surfaces what is loaded into every host-runtime session and how much of the context window it consumes, then recommends the highest-leverage trims.

Complementary lens: mewkit validate --substrate shows the same artifact set grouped by the responsibility each serves (covered / partial / missing), so a trim can be checked against responsibility coverage before removing an artifact. The per-phase read budget that bounds what an audit-driven session should load lives in .claude/skills/agent-detector/references/context-budget-rules.md.

When to Use

Three concrete triggers:

  1. Pre-add capacity check — before adding a new agent, skill, or rule file, confirm the project is below the 25% structural-overhead threshold.
  2. Post-degradation diagnostic — when sessions feel slow, off-topic, or over-compacted, audit to see if structural overhead has grown past 10%.
  3. Periodic health audit — on model upgrades, confirm the always-on bundle still pays its keep (the dead-weight audit in .claude/skills/cook/references/harness-rules.md Rule 7, where that tooling is present).

Context vs Cost (Boundary)

Concern Mechanism Unit
Monetary cost mewkit budget and .claude/skills/autobuild/scripts/budget-tracker.sh USD
Window utilization (this skill) /mk:context-audit and scripts/inventory-context.sh tokens / %

This skill measures only what is statically loaded into every session: the always-on bundle (project instructions, agents, skills, rules, any project commands, MCP config). Conversation history, tool output and active edits live elsewhere.

Workflow

Run the pipeline from the project root (or pass the root as the first argument):

SCAN_ROOT="${1:-$PWD}"
bash ${CLAUDE_SKILL_DIR}/scripts/inventory-context.sh "$SCAN_ROOT" \
  | bash ${CLAUDE_SKILL_DIR}/scripts/estimate-tokens.sh \
  | bash ${CLAUDE_SKILL_DIR}/scripts/format-audit-report.sh

Read the full file on GitHub · 101 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago Changed · -45 lines 544586c61376
  2. 12d ago Changed · -3 tokens per session a9d5afcf7313
  3. 17d ago Changed · -6 tokens per session a56341aba865
  4. 19d ago Changed 49b2e454bdc9
  5. 22d ago Changed · -1 lines 668d8cb2f6c3
  6. 24d ago Changed · -7 lines · -75 tokens per session d6c8e585c6aa
  7. 3mo ago First seen · 154 lines · 108 tokens per session scan A 805fa304b84e

Subscribe to this mod's changes

mk:context-audit is a skill published in the GitHub repository ngocsangyem/MeowKit (18 stars, last pushed 2d ago), licensed MIT. It adds 24 tokens to every session and 1,024 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-03.

Related

mk:context-audit compared with skills from other repositories

mk:context-audit next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mk:context-auditngocsangyem/MeowKitSkill182d agoMITA24Claude Code
context-budgetcoco-research/cocoSkill337yesterdayApache-2.0A49Claude Code, Codex
pw-security-audittrk/processwire-boostSkill5yesterdayMITA67Claude Code, Codex
pw-experttrk/processwire-boostSkill5yesterdayMITA47Claude Code, Codex
pw-module-developmenttrk/processwire-boostSkill5yesterdayMITA66Claude Code, Codex
pw-custom-page-classestrk/processwire-boostSkill5yesterdayMITA40Claude Code, Codex
pw-docs-architecttrk/processwire-boostSkill5yesterdayMITA40Claude Code, Codex