/context-engineering-skills:token-budget-auditorfrom context-engineering-skills
Measures token usage per context source (instructions, tools, knowledge, memory, input) against a budget. Reports where to cut, compress, or isolate context to reduce cost and latency.
Ships in context-engineering-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Measure what fills this agent's context, compare it with the token budget, and tell the user what to remove, compress, or move out of the main context.
instructions (system prompt, instruction artifacts, loaded skills), tools (tool definitions), knowledge (retrieved or stuffed documents), memory (conversation history, stored memories, state), or input (the current user message).python3 <this skill's directory>/scripts/count_tokens.py --budget <N> <source>=<path> ..., with one argument per file or folder and paths relative to the project root. Copy its JSON output into the tokens field. If Python is not available, estimate characters divided by four per source and say so in the summary.references/checklist.md and look for the patterns it lists, starting with the largest source.## Token budget section after the summary: a table with one row per source and the columns Source, Files, Tokens, and Share of total, followed by the total and the budget.Write the report in Markdown, in this order:
## Summary: two to four sentences on the overall state and the most important change.## Findings: one bullet per finding, most severe first, in the form - [severity] location: problem. Fix: suggested fix. (book section). Severity is high when the problem causes wrong or unsafe behavior, medium when it makes results unreliable or costly, and low for clarity or maintenance issues. If there are no problems, write No findings.json block with the same content, as in this example.{
"skill": "token-budget-auditor",
"summary": "...",
"tokens": {
"method": "estimate:chars/4",
"budget": 8000,
"sources": [],
"total": 0,
"over_budget": false
},
"findings": [
{
"severity": "high",
"location": "retrieved.md",
"problem": "...",
"fix": "...",
"book_section": "Chapter 7, Context selection"
}
]
}
Use the book section given in the checklist for each rule. If the input is missing or out of scope for this skill, say so in one sentence and stop.
Learn more: Chapter 7 of Context Engineering (Manning), https://hubs.la/Q04ksQ8J0
examples/budget.txt (opens in a new tab)examples/context/history.md (opens in a new tab)examples/context/retrieved.md (opens in a new tab)examples/context/system-prompt.md (opens in a new tab)examples/context/tools.json (opens in a new tab)examples/expected-findings.md (opens in a new tab)references/checklist.md (opens in a new tab)scripts/count_tokens.py (opens in a new tab)scripts/test_count_tokens.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
9 skills in this plugin
/eval-builderBuilds an evaluation set for an LLM application or agent from its specification: happy-path, edge-case, policy-violation, and adversarial cases with deterministic assertions and LLM-as-judge rubrics, written as Promptfoo tests. Also reports gaps in the specification that make behavior impossible to evaluate. Use when the user asks for evals, test cases, a test set, or a rubric for a prompt or agent. Do not use to review existing code tests or to run evaluations./governance-checkChecks an agent or LLM application for governance and security risks before it reaches production: prompt injection surfaces (direct and indirect), tools with excessive permissions or no approval step, data exfiltration paths, personal data in prompts and logs, and missing human oversight or audit trails. Use when the user asks for a security, privacy, or governance review of an agent, or whether it is safe to deploy. Do not use for general code security audits unrelated to LLMs, or for tool usability (use tool-reviewer)./instruction-auditorAudits a system prompt or an instruction artifact (AGENTS.md, CLAUDE.md, GEMINI.md, .cursor/rules, copilot-instructions.md) and reports contradictions, vague or unenforceable rules, excessive size, and procedures that belong in a skill or a tool. Use when the user asks to review, audit, shorten, or improve agent instructions or a system prompt. Do not use for SKILL.md files (use skill-reviewer) or for user prompt templates (use prompt-reviewer).npx claudepluginhub bonigarcia/context-engineering --plugin context-engineering-skillsOther plugins' skills for the same job