US

Analyzes context usage to identify token waste and provide optimization fixes.

Install

mkdir -p .claude/skills/usage-audit && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16780" && unzip -o skill.zip -d .claude/skills/usage-audit && rm skill.zip

Installs to .claude/skills/usage-audit

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Audit your Claude Code setup for token waste and context bloat. Use when the user says "audit my context", "check my settings", "why is Claude so slow", "token optimization", "context audit", or runs /context-audit. Starts by running /context to see real overhead, then audits MCP servers, CLAUDE.md rules, skills, settings, and file permissions. Returns a health score with specific fixes.
390 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Audit MCP servers for token overhead
  • Scan CLAUDE.md files for rule quality
  • Check skill files for length and instruction quality
  • Review settings.json for autocompact and bash output overrides
  • Examine file permissions for bloat directory denials
  • Calculate a health score and suggest fixes

How it works

The skill analyzes the provided /context output, then audits MCP servers, CLAUDE.md rules, skills, settings, and file permissions. It calculates a health score based on identified issues.

Inputs & outputs

You give it
Output from the /context command, project settings, CLAUDE.md files, and skill files
You get back
A health score, a list of issues with fixes, and top 3 fixes

When to use usage-audit

  • Audit context
  • Check token usage
  • Optimize settings

About this skill

Usage Audit

Bloated context costs more and produces worse output. This skill finds the waste and tells you what to cut.

Step 1: Get /context Data

Check the conversation history for /context output. If the user already ran /context in this session, use that data. If not, ask:

"Run /context in this session terminal and let me know when you're done. I can't run slash commands myself, but once I can see the breakdown I'll audit everything it flags."

STOP HERE. Do NOT proceed to Step 2 until the user has ran /context. The context breakdown determines what to audit and in what order. Without it, the audit is guessing. Output the message above and wait for the user's next message.

Step 2: Audit What's Bloated

Based on the /context output, audit each category from largest to smallest. Run checks in parallel where possible.

MCP Servers

Each server loads full tool definitions into context every turn (~15,000-20,000 tokens each).

  • Count configured servers from settings.json
  • Flag any with CLI alternatives (Playwright, Google Workspace, GitHub all have CLIs that cost zero tokens when idle)
  • Report total MCP overhead from /context output

CLAUDE.md

Read all CLAUDE.md files (project root, .claude/, ~/.claude/). Count lines. Then read every rule and test against five filters:

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

If total CLAUDE.md lines > 200, check for progressive disclosure opportunities: rules that only apply to specific tasks (API conventions, deployment steps, testing guidelines) should move to reference files with one-line pointers. Only recommend splitting when the file is actually bloated -- a lean CLAUDE.md with universal context is fine as a single file.

Skills

Scan .claude/skills/*/SKILL.md. For each skill:

  • Count lines (flag > 200, critical > 500)
  • Run the same five filters on instructions
  • Check for restated goals, hedging ("you may want to"), synonymous instructions ("be concise" + "keep it short" + "don't be verbose")

Settings

Check settings.json for:

SettingFlag ifRecommended
autocompact_percentage_overrideMissing or > 8075
BASH_MAX_OUTPUT_LENGTH (env)At default (30-50K)150000

File Permissions

Check settings.json for permissions.deny rules. If missing, check whether bloat directories exist in the project:

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

Step 3: Score and Report

Score starts at 100. Deduct per issue:

IssuePoints
CLAUDE.md > 200 lines-10
CLAUDE.md > 500 lines-20
Per 5 rules flagged by filters-5
Contradictions between files-10
Missing autocompact override-10
Missing bash output override-5
Skill > 200 lines-5 each
Skill > 500 lines-10 each
Per MCP server-3 each
No deny rules + 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 from /context output}

## Issues Found

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

### Rules to Cut
{Each flagged rule: the 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:

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

  • Show you a cleaned-up CLAUDE.md with the flagged rules removed
  • Add the missing settings.json configs
  • Add permissions.deny rules for build artifacts
  • Show which skills to compress"

Auto-apply settings.json and permissions.deny (safe, reversible). Show diffs for CLAUDE.md and skills -- let the user confirm before modifying instruction files.

When not to use it

  • When the user has not run /context in the current session
  • When a detailed context breakdown is not available

Limitations

  • Requires /context output to proceed with the audit
  • Cannot run slash commands itself
  • Cannot modify instruction files without user confirmation

How it compares

This skill automates the analysis of various configuration files and settings to identify token waste and context bloat, rather than requiring manual inspection.

Compared to similar skills

usage-audit side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
usage-audit (this skill)03moNo flagsIntermediate
bullmq-specialist256moNo flagsIntermediate
agent-orchestration-multi-agent-optimize24moNo flagsAdvanced
agent-load-balancer16moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

bullmq-specialist

davila7

BullMQ expert for Redis-backed job queues, background processing, and reliable async execution in Node.js/TypeScript applications. Use when: bullmq, bull queue, redis queue, background job, job queue.

2595

agent-orchestration-multi-agent-optimize

sickn33

Optimize multi-agent systems with coordinated profiling, workload distribution, and cost-aware orchestration. Use when improving agent performance, throughput, or reliability.

218

agent-load-balancer

ruvnet

Agent skill for load-balancer - invoke with $agent-load-balancer

10

awq-quantization

davila7

Activation-aware weight quantization for 4-bit LLM compression with 3x speedup and minimal accuracy loss. Use when deploying large models (7B-70B) on limited GPU memory, when you need faster inference than GPTQ with better accuracy preservation, or for instruction-tuned and multimodal models. MLSys 2024 Best Paper Award winner.

10

clay-load-scale

jeremylongshore

Implement Clay load testing, auto-scaling, and capacity planning strategies. Use when running performance tests, configuring horizontal scaling, or planning capacity for Clay integrations. Trigger with phrases like "clay load test", "clay scale", "clay performance test", "clay capacity", "clay k6", "clay benchmark".

10

firecrawl-load-scale

jeremylongshore

Implement FireCrawl load testing, auto-scaling, and capacity planning strategies. Use when running performance tests, configuring horizontal scaling, or planning capacity for FireCrawl integrations. Trigger with phrases like "firecrawl load test", "firecrawl scale", "firecrawl performance test", "firecrawl capacity", "firecrawl k6", "firecrawl benchmark".

10

Search skills

Search the agent skills registry