token-audit

Audit agent configuration files to estimate per-session token costs and propose reduction plans.

2|1|Updated Jun 23, 2026
One-click install
npx skills add https://github.com/Kaidanov/grekai-skills-4all --skill token-audit-kaidanov
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: token-audit
Source: https://github.com/Kaidanov/grekai-skills-4all/tree/main/skills/token-audit
Command: npx skills add https://github.com/Kaidanov/grekai-skills-4all --skill token-audit-kaidanov

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Every session, your agent silently loads CLAUDE.md files, MCP server tool schemas, SessionStart hooks, skill descriptions, agent definitions, and memory indexes before you type a word — and each one costs tokens on every session. This Skill inventories those always-on sources, estimates their cost, and produces a prioritized, quality-preserving plan to trim them. ## Core Features & Use Cases - Read-only inventory and ranking: Sizes CLAUDE.md chains, MCP servers, hooks, skills, agents, plugins, and memory using a bytes÷4 token estimate, then ranks sinks biggest-first with quality-risk annotations. - Top-3 quick wins with concrete actions: Proposes the highest-reclaim, lowest-risk cuts (disable unused eager MCP servers, gate SessionStart knowledge dumps, dedup CLAUDE.md) with exact commands and estimated tokens reclaimed. - Safe, reversible changes: Proposes rather than changes by default; on approval or --apply, it disables or backs up instead of deleting. - Use Case: Your Claude Code sessions feel bloated and slow. Run the audit to discover an unused eager MCP server consuming ~4,200 tokens per session and a SessionStart hook dumping platform docs you never use, then reclaim ~60% of your baseline. ## Quick Start Ask the agent to run /token-audit to inventory your setup and show the top token-saving opportunities.

Frequently Asked Questions about token-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce token usage in Claude Code?

Run /token-audit to inventory every always-on context source — MCP servers, SessionStart hooks, CLAUDE.md files, skills, agents, and memory — ranked by estimated tokens per session. It returns top quick wins with exact commands, such as disabling unused eager MCP servers.

What consumes the most context tokens in an agent setup?

Eagerly-loaded MCP servers are usually the largest sink because they inject all their tool schemas every session. SessionStart hooks that dump static knowledge and long session transcripts are the next biggest contributors.

Does the token audit change my configuration automatically?

No, it is read-only by default and only proposes changes. Edits happen only after you approve them or pass --apply, and it disables or backs up files rather than deleting anything.

How accurate are the token estimates in the audit?

Estimates use a bytes-divided-by-four heuristic, which is reliable for ranking sources by relative size but not for billing. The harness does not expose true per-source token counts, so all figures are marked as estimates.

Can I use token-audit with the tldr skill?

Yes, they complement each other. token-audit trims the always-on baseline loaded at session start, while tldr reports your actual token spend per turn during a session.