Agent skill

Usage Audit

by Mathews-Tom in Mathews-Tom/armory

Audit a Claude Code setup for token waste and context bloat.

MITAuto-check passedAgent Workflows

Install Usage Audit

skills CLI
$ npx skills add Mathews-Tom/armory --skill usage-audit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Mathews-Tom/armory usage-audit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Mathews-Tom/armory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/usage-audit .claude/skills/usage-audit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
usage-audit
GitHub stars
328
Token cost
~1.8k tokens
SKILL.md length
868 words
Files
2
Skills in repo
80
Repo updated
First seen
Licence
MIT

At a glance

Audit a Claude Code setup for token waste and context bloat.

  • Works in 4 steps: Get /context Data → Audit What's Bloated → Score and Report → …
  • : audit my context
  • SKILL.md covers Step 1: Get /context Data, Step 2: Audit What's Bloated, Step 3: Score and Report and Step 4: Offer to Fix
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Usage Audit is an agent skill from Mathews-Tom/armory. Audit a Claude Code setup for token waste and context bloat. Checks MCP servers, CLAUDE.md, skills, and settings against bloat filters. Triggers on: "audit my context", "usage audit", "token audit", "context bloat". NOT for codebase audits.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `evals/cases.yaml`).

It sits in Agent Workflows, covering MCP servers and Agent instruction files. It works with Model Context Protocol. The repository describes itself as: Curated, production-grade skills for AI coding agents. Battle-tested workflows for developers who use AI seriously. The licence is MIT.

When your agent uses it

  • : audit my context
  • Tasks that involve MCP servers
  • Tasks that involve Agent instruction files

Example prompts

  • “audit my context”
  • “usage audit”
  • “token audit”
  • “/usage-audit”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Get /context Data
  2. Audit What's Bloated
  3. Score and Report
  4. Offer to Fix

What it can do on your machine

Read from SKILL.md and the folder at commit 4594fb7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Usage Audit loads about 1.8k tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 868 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Mathews-Tom/armory at commit 4594fb7, republished under its MIT licence (© Mathews-Tom). 868 words, ~1,825 tokens.

Download SKILL.mdSave it as .claude/skills/usage-audit/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
usage-audit
description
Audit a Claude Code setup for token waste and context bloat. Checks MCP servers, CLAUDE.md, skills, and settings against bloat filters. Triggers on: "audit my context", "usage audit", "token audit", "context bloat". NOT for codebase audits.
metadata.version
1.0.0
metadata.category
review
metadata.tags
context, tokens, audit, claude-code, bloat
metadata.difficulty
intermediate

Usage Audit

Bloated context costs twice: you burn usage limits faster and output quality drops because models attend most to the start and end of context. This skill finds the waste and tells you what to cut.

Credit: adapted from the context-audit skill in the Claude Code Context Cleanup Guide (2026). Armory port adds package-aware checks and treats the scoring rubric as an overridable reference, not a verdict.

Step 1: Get /context Data

Check the conversation for recent /context output. If the user has not run it in this session, ask:

"Run /context in this terminal and paste the output. I can't run slash commands myself — once I can see the breakdown I'll audit everything it flags."

STOP HERE. Do not proceed to Step 2 until real /context data is available. The breakdown determines what to audit and in what order. Without it, the audit is guessing. Output the message above and wait.

Step 2: Audit What's Bloated

Work the categories from largest to smallest in the /context output. Run independent checks in parallel.

MCP Servers

Each connected server loads full tool definitions into context every turn (~15,000-20,000 tokens each), whether you invoke a tool or not. Under Opus 4.7 this figure can run 1.0–1.35× higher for the same schemas due to a tokenizer update — prefer measured values from /context over these static estimates.

  • Count configured servers in settings.json and ~/.claude/settings.json.
  • Report total MCP overhead from /context.
  • Flag any server with a CLI equivalent (Playwright, GitHub, Google Workspace, Notion, Slack, etc.) — the CLI costs zero tokens when idle.
  • Cross-reference installed armory packages: if mcp-to-skill is installed, recommend it explicitly for the heaviest server.
CLAUDE.md Files

Read every CLAUDE.md in scope (project root, .claude/, ~/.claude/). For each file: count lines, then test every rule against the five filters.

FilterFlag when...
DefaultClaude already does this without being told ("write clean code", "handle errors")
ContradictionConflicts with another rule in the same or a different file
RedundancyRepeats something already covered elsewhere
BandaidAdded to fix one specific bad output, not improve outputs generally
VagueInterpreted differently every time ("be natural", "use good tone")

If a CLAUDE.md exceeds 200 lines, check for progressive-disclosure opportunities: rules that only apply to specific tasks (API conventions, deploy steps, testing) should move to reference files with one-line pointers from the core file. A lean CLAUDE.md under 200 lines with universal context is fine as a single file — do not split for the sake of splitting.

Rules Packages (armory-specific)

Armory rules/ packages load into every session like CLAUDE.md does — they are the real silent base tax. Higher priority than skill bloat.

  • Enumerate installed rules packages via ~/.claude/settings.json or the armory installer registry if present.
  • For each rules package, read its RULE.md body, count lines, apply the same five filters.
  • Flag any rules package over 300 lines. These hit every turn.
Show full SKILL.md (394 more words)Show less
Installed Skills

Scan ~/.claude/skills/*/SKILL.md and any project-local skills. For each:

  • Measure SKILL.md body lines only — do NOT count files under references/, scripts/, or evals/. Those load on demand, not on trigger. Penalizing total package LOC misattributes cost.
  • Flag SKILL.md body > 200 lines (warn) or > 500 lines (critical).
  • Run the five filters on skill instructions: restated goals, hedging ("you may want to"), synonymous instructions ("be concise" + "keep it short" + "don't be verbose").
  • Frontmatter description audit: count words in each skill's description field. Flag any over 60 words. Skill descriptions load into the router on every session and should be trigger-focused, not prose.
Settings

Check settings.json for these keys:

SettingFlag ifRecommended
autocompact_percentage_overrideMissing or > 8075
env.BASH_MAX_OUTPUT_LENGTHAt default (30-50K)150000
File Permissions

Check permissions.deny in settings.json. If missing, inspect the project and flag bloat directories that should be denied:

If this exists...Should deny...
package.jsonnode_modules, dist, build, .next, coverage
Cargo.tomltarget
go.modvendor
pyproject.toml / requirements.txt__pycache__, .venv, *.egg-info

Step 3: Score and Report

The rubric below is a reference default, not gospel. A "reference" skill that wraps a large CLI surface (e.g., github, agent-builder) may legitimately exceed line thresholds — judge the body, not the file count. Users can override any deduction in their project CLAUDE.md.

Score starts at 100. Deduct per issue:

IssuePoints
CLAUDE.md > 200 lines-10
CLAUDE.md > 500 lines-20
Rules package > 300 lines (body)-10 each
Per 5 rules flagged by filters-5
Contradictions between files-10
Missing autocompact_percentage_override-10
Missing BASH_MAX_OUTPUT_LENGTH override-5
Skill body > 200 lines-5 each
Skill body > 500 lines-10 each
Skill description > 60 words-2 each
Per connected MCP server with CLI equivalent-5 each
No permissions.deny and bloat dirs exist-10

Floor at 0. Output this format:

# Usage Audit

Score: {N}/100 [{CLEAN|NEEDS WORK|BLOATED|CRITICAL}]

## Context Breakdown (from /context)
{Paste the key numbers}

## Issues Found

### [{CRITICAL|WARNING|INFO}] {Category}
{What's wrong}
Fix: {One-line actionable fix}

### Rules to Cut
{Each flagged rule: quoted text, which filter, one-line reason}

### Conflicts
{Contradictions between files, with paths}

## Top 3 Fixes
1. {Highest-impact fix}
2. {Second}
3. {Third}

Score labels: 90-100 CLEAN, 70-89 NEEDS WORK, 50-69 BLOATED, 0-49 CRITICAL. Severity: CRITICAL > 10pts, WARNING 5-10pts, INFO < 5pts.

Step 4: Offer to Fix

After the report, offer targeted fixes:

"Want me to apply any of these? I can:

  • Add missing settings.json keys (autocompact_percentage_override, BASH_MAX_OUTPUT_LENGTH)
  • Add permissions.deny rules for detected bloat directories
  • Show a cleaned-up CLAUDE.md diff with flagged rules removed
  • Compress fat skill frontmatter descriptions
  • Recommend specific MCP servers to disconnect this session"

Auto-apply the settings and permissions changes (safe, reversible). Show a diff and wait for confirmation before modifying any instruction file (CLAUDE.md, RULE.md, SKILL.md) — instruction edits are load-bearing and users need final say.

© Mathews-Tom, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/usage-audit of Mathews-Tom/armory.

  • SKILL.md
  • evals/cases.yaml

Open the folder on GitHubat commit 4594fb7

Compare with similar skills

Usage Audit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Usage Audit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Usage Audit this skillMathews-Tom/armory328—~1.8kAutomated safety check: PassMIT
Agent Setup Health Audittw93/Waza7.2k—~5.2kAutomated safety check: NotesMIT
Semantix GuideGnosil/semantix821—~2.1kAutomated safety check: PassMIT
Working With Claude Code Docsobra/superpowers-developing-for-claude-code142—~1.5kAutomated safety check: PassNone
Agnixagent-sh/agnix446—~874Automated safety check: PassApache-2.0
Claude Docs Consultantcentminmod/my-claude-code-setup2.7k—~959Automated safety check: PassMIT

Similar skills

  • Audits a project's agent configuration, instruction drift, hooks, MCP and AI maintainability, then reports prioritized findings with evidence and next actions.

    7.2k GitHub stars~5.2k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Semantix Guide

    Gnosil/semantix

    Troubleshoot and configure Semantix capabilities: Skills (project/custom/global/builtin priority, discovery dirs), Commands (override order, /dir:file naming), Hooks (11 events, automatic project…

    821 GitHub stars~2.1k tokensUpdated 4 days ago
    Agent WorkflowsAuto-check passed
  • Working With Claude Code Docs

    obra/superpowers-developing-for-claude-code

    Looks up official Claude Code documentation stored as reference files instead of guessing about CLI commands, configuration, or plugin APIs.

    142 GitHub stars~1.5k tokensUpdated 10 mo ago
    Agent WorkflowsAuto-check passed
  • Agnix

    agent-sh/agnix

    A skill your agent uses when user asks to 'lint agent configs', 'validate skills', 'check CLAUDE.md', 'validate hooks', 'lint MCP'.

    446 GitHub stars~874 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Claude Docs Consultant

    centminmod/my-claude-code-setup

    Consult official Claude Code documentation from code.claude.com using selective fetching.

    2.7k GitHub stars~959 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Clawmem

    yoloshii/ClawMem

    ClawMem operational reference for agents at query time — the 3-rule escalation gate, MCP tool routing, the 4 query-optimization levers, pipeline behavior (query vs intentsearch), composite scoring…

    210 GitHub stars~7.5k tokensUpdated 3 days ago
    Agent WorkflowsAuto-check passed

More from Mathews-Tom/armory

All 80 skills in this repo
  • Architecture Reviewer

    Mathews-Tom/armory

    Architecture reviews across 7 dimensions (structural, scalability, enterprise readiness, performance, security, ops, data) with scored reports.

    328 GitHub stars~4.6k tokensUpdated 3 days ago
    Auto-check passed
  • Concept To Image

    Mathews-Tom/armory

    Turn concepts into static HTML visuals exported as PNG or SVG files via HTML/CSS/SVG.

    328 GitHub stars~2.6k tokensUpdated 3 days ago
    Auto-check passed
  • Watch

    Mathews-Tom/armory

    A skill your agent uses when analyzing an existing video URL or local recording: "watch this video", "analyze youtube video", "summarize this video", "youtube transcript", "find this moment", "what…

    328 GitHub stars~2.8k tokensUpdated 3 days ago
    Auto-check passed
  • Code Refiner

    Mathews-Tom/armory

    Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust.

    328 GitHub stars~3.1k tokensUpdated 3 days ago
    Auto-check passed
  • Concept To Video

    Mathews-Tom/armory

    Turn concepts into animated explainer videos using Manim (Python) with MP4/GIF output, audio overlay, multi-scene composition.

    328 GitHub stars~4.9k tokensUpdated 3 days ago
    Auto-check passed
  • Decision Map

    Mathews-Tom/armory

    Maps the unresolved architecture, policy, and scope decisions that must be answered before planning can start: one durable decision ticket per question on the issue tracker, typed and blocker-linked…

    328 GitHub stars~2.7k tokensUpdated 3 days ago
    Auto-check passed

Categories

Questions about Usage Audit

What does Usage Audit do?

Audit a Claude Code setup for token waste and context bloat. Usage Audit is an agent skill from Mathews-Tom/armory. Audit a Claude Code setup for token waste and context bloat.

When should I use Usage Audit?

Usage Audit fits situations like: : audit my context; tasks that involve MCP servers; tasks that involve Agent instruction files.

How do I install Usage Audit in Claude Code?

Run `npx skills add Mathews-Tom/armory --skill usage-audit -a claude-code`. Or copy the skill folder (skills/usage-audit in Mathews-Tom/armory) into .claude/skills/usage-audit in your project. Claude Code loads it when a task matches its description.

How do I install Usage Audit in Codex?

Run `npx skills add Mathews-Tom/armory --skill usage-audit -a codex`. Or copy the skill folder (skills/usage-audit in Mathews-Tom/armory) into .agents/skills/usage-audit in your project. Codex loads it when a task matches its description.

Can I use Usage Audit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Mathews-Tom/armory --skill usage-audit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/usage-audit, .gemini/skills/usage-audit, .github/skills/usage-audit and .opencode/skills/usage-audit in your project.

What does Usage Audit need to run?

SKILL.md names no scripts, command-line tools or credentials: Usage Audit is instructions for the agent only.

Does Usage Audit access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Usage Audit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Usage Audit use?

Usage Audit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Usage Audit use?

About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Usage Audit?

Skills that share tags, products or a category with Usage Audit: Agent Setup Health Audit (tw93/Waza, 7.2k stars), Semantix Guide (Gnosil/semantix, 821 stars), Working With Claude Code Docs (obra/superpowers-developing-for-claude-code, 142 stars) and Agnix (agent-sh/agnix, 446 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Usage Audit?

Mathews-Tom (a GitHub user) maintains it in Mathews-Tom/armory, which has 328 GitHub stars. The repository holds 80 skills in this directory. The repository was last updated on October 6, 2026.

Source: Mathews-Tom/armory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.