Agent skill · Audited from source
Token Audit
skill · FlorianBruniaux/claude-code-ultimate-guideCC-BY-SA-4.0 licenceAudited 7 Oct 2026 · source d90170da4369
Is it safe? With care — CAUTION, grade B (89/100). We read this skill's source at commit d90170da4369 and found no filesystem, network or shell access and no hard-coded secrets. The audit raised 2 findings, 0 critical or high. What it does: Audit Claude Code configuration to measure fixed-context token overhead and produce a prioritized action plan. Use when hitting rate limits, experiencing early context compression, or after adding significant config…
Cite
Cite this page
ModelsAtlas. “Token Audit (FlorianBruniaux/claude-code-ultimate-guide)”. Retrieved 7 Oct 2026. https://modelsatlas.com/skills/florianbruniaux/token-audit
Trust audit
Audit 0.4.1 · source read 7 Oct 2026
CAUTION means the audit found things worth knowing before you trust this skill. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | WARN | 2 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (2)
MEDIUMInventory / provenanceinv.symlink · whitepapers/recap-cards/en/_extensions
whitepapers/recap-cards/en/_extensions
- Why
- link not followed
- Fix
- —
MEDIUMInventory / provenanceinv.symlink · whitepapers/recap-cards/fr/_extensions
whitepapers/recap-cards/fr/_extensions
- Why
- link not followed
- Fix
- —
Audit 0.4.1 · source sha d90170da4369 · 7 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- PublisherFlorianBruniaux GitHub userOwner of the repository this skill is read from
- Source folderFlorianBruniaux/claude-code-ultimate-guide/examples/skills/token-auditThe exact folder we audited
- LicenceCC-BY-SA-4.0As the repository states it
- Commit pinned for this verdictd90170da4369A new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Audit Claude Code configuration to measure fixed-context token overhead and produce a prioritized action plan. Use when hitting rate limits, experiencing early context compression, or after adding significant config…
---
name: token-audit
description: "Audit Claude Code configuration to measure fixed-context token overhead and produce a prioritized action plan. Use when hitting rate limits, experiencing early context compression, or after adding significant config files."
effort: medium
allowed-tools: Read Grep Glob Bash
---
# /token-audit: Context token audit
**Purpose**: Measure how many tokens your Claude Code configuration consumes before any user task begins. Identify the biggest sources of overhead. Produce a concrete action plan with savings estimates.
**When to use**:
- You're hitting rate limits before end of day
- Sessions feel slow or context compresses early
- You've added a lot of rules files and want to know the real cost
- After a major config change
---
## What you will measure
| Component | Loaded when | Typical range |
|-----------|-------------|---------------|
| `~/.claude/CLAUDE.md` + @imports | Always | 5-15K tokens |
| Project `CLAUDE.md` | Always | 2-8K tokens |
| `.claude/rules/*.md` | Always (all files) | 5-40K tokens |
| `MEMORY.md` | Always | 1-3K tokens |
| Claude Code system prompt | Always | ~7,500 tokens |
| Hook stdout | Per tool call | variable |
| Commands, agents, skills | On invocation only | 0 by default |
Key insight: `.claude/rules/` loads every `.md` file at session start, regardless of relevance. Commands and agents are lazy-loaded — they cost zero until invoked. Rules files are the most common source of unexpected overhead.
---
## Step 1 — run the measurement
Execute these commands from the project root:
```bash
# Component sizes
echo "=== PROJECT CLAUDE.md ===" && wc -c CLAUDE.md 2>/dev/null || echo "none"
echo ""
echo "=== RULES FILES (sorted by size) ===" && find .claude/rules -name "*.md" 2>/dev/null \
| xargs wc -c 2>/dev/null | sort -rn | head -20
echo ""
echo "=== GLOBAL ~/.claude ===" && ls -la ~/.claude/*.md 2>/dev/null \
| awk '{print $5, $9}' | sort -rn
```
Then calculate the full budget:
```bash
GLOBAL=$(cat ~/.claude/CLAUDE.md ~/.claude/*.md 2>/dev/null | wc -c)
PROJECT=$(wc -c < CLAUDE.md 2>/dev/null || echo 0)
RULES=$(find .claude/rules -name "*.md" 2>/dev/null | xargs cat 2>/dev/null | wc -c || echo 0)
MEMORY=$(find ~/.claude/projects -name "MEMORY.md" 2>/dev/null \
| xargs grep -l "$(basename $(pwd))" 2>/dev/null | head -1 \
| xargs wc -c 2>/dev/null | awk '{print $1}' || echo 0)
TOTAL=$(( GLOBAL + PROJECT + RULES + MEMORY + 30000 ))
echo "Global ~/.claude : ~$(( GLOBAL / 4 )) tokens ($(( GLOBAL / 1000 ))K chars)"
echo "Project CLAUDE.md : ~$(( PROJECT / 4 )) tokens"
echo "Rules (auto-loaded): ~$(( RULES / 4 )) tokens"
echo "MEMORY.md : ~$(( MEMORY / 4 )) tokens"
echo "System prompt : ~7,500 tokens"
echo "---"
echo "TOTAL fixed context: ~$(( TOTAL / 4 )) tokens"
echo "% of 200K window : $(( TOTAL / 4 * 100 / 200000 ))%"
```
---
## Step 2 — classify rules files
For each file in `.claude/rules/`, classify it:
| Class | Definition | Action |
|-------|------------|--------|
| **ALWAYS** | Applies to most tasks (conventions, output format, safety) | Keep auto-loaded |
| **SOMETIMES** | Relevant in 20-40% of sessions | Keep if small (<3K chars); lazy-load if large |
| **RARELY** | Relevant in <10% of sessions (Figma, Windows, design system) | Remove from auto-load |
| **NEVER** | Outdated or covered elsewhere | Delete or archive |
Run this classification prompt:
```
Read every file in .claude/rules/. For each file, output a table row:
| File | Size (chars) | Class (ALWAYS/SOMETIMES/RARELY/NEVER) | Reasoning (one sentence) |
Sort by size descending within each class.
At the end, calculate: total chars that would leave the fixed context if all
RARELY and NEVER files were excluded. Convert to tokens (÷ 4).
```
---
## Step 3 — audit hook overhead
Hooks on `PreToolUse` and `PostToolUse` fire on every tool call. Each invocation injects its stdout into context. A hook outputting 500 chars on 150 tool calls per session = 75K chars ≈ 19K extra tokens.
Check what you have:
```bash
# List hooks by event type
python3 - << 'EOF'
import json, os
for path in [os.path.expanduser("~/.claude/settings.json"), ".claude/settings.json"]:
if not os.path.exists(path): continue
print(f"\n--- {path} ---")
data = json.load(open(path))
for event, hooks in data.get("hooks", {}).items():
for h in hooks:
cmd = h.get("command", "?")
matcher = h.get("matcher", "*")
print(f" [{event}] matcher={matcher} → {cmd[:80]}")
EOF
```
For each `PreToolUse` or `PostToolUse` hook, estimate its stdout size by running it manually. Multiply by your average tool call count per session (visible in `/cost` after a session).
**Red flags**:
- Hooks that `cat` files unconditionally
- `git status` or `git log` on every call
- Multi-line echo output for debugging that was never removed
- JSON blobs injected as context
---
## Step 4 — build the action plan
Produce a prioritized table. Rule of thumb: only include actions achievable without external infrastructure (no RAG, no vector databases, no custom MCP servers).
| Action | Estimated token savings | Effort | Risk |
|--------|------------------------|--------|------|
| Remove RARELY files from auto-load | varies | 30 min | Low |
| Split large rules into core + detail | varies | 1-2h | Low |
| Trim hook stdout to essential fields | varies | 1h | Low |
| Compress verbose rules (see §8 context-engineering.md) | 20-30% of rules | 1-2h | Low |
| Archive outdated MEMORY.md entries | 500-1K tokens | 30 min | Low |
---
## Step 5 — the RAG question
Lazy-loading via a vector database (RAG) is sometimes pitched as the solution. Assess it honestly before committing:
1. What fixed-context tokens remain after Steps 1-4? (Measure this first.)
2. Is RAG justified? A pgvector + custom MCP setup is a 1-2 week project.
3. Break-even: if you have 10 rules files averaging 3K chars each, classification (30 min) saves as much as RAG would. RAG earns iExcerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit d90170d
git clone https://github.com/FlorianBruniaux/claude-code-ultimate-guide git -C claude-code-ultimate-guide checkout d90170da4369
The author documents no install command, so this uses the repository directly. Our verdict covers commit d90170da4369 only.
Works in which agents?
What its own text says, not a test
| Agent | Status | More |
|---|---|---|
| Claude Code | Mentioned in its text, not tested | Skills for Claude Code · About Claude Code |
Audit history
Every audit, every source change
- !CAUTION B 89 / 100
first audit · source
d90170da4369
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/florianbruniaux/token-audit/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
All coding & review skills →FlorianBruniaux/claude-code-ultimate-guide
Audit Claude Code agents, skills, and commands for quality and production readiness. Use when evaluating skill quality, checking production readiness scores, or comparing agents against best-practice templates.
FlorianBruniaux/claude-code-ultimate-guide
Codebase health audit scoring 7 categories with progression plan
FlorianBruniaux/claude-code-ultimate-guide
Autonomous improvement loop: scan codebase metrics, scaffold experiment files, run agent-driven iterations until metric improves
FlorianBruniaux/claude-code-ultimate-guide
Post-deploy monitoring: watch production after a deploy and alert on regressions
FlorianBruniaux/claude-code-ultimate-guide
Restore context after /clear by summarizing recent work and project state
FlorianBruniaux/claude-code-ultimate-guide
Launch and navigate the ccboard TUI/Web dashboard for Claude Code. Use when monitoring token usage, tracking costs, browsing sessions, or checking MCP server status across projects.
Add this badge to your README
[](https://modelsatlas.com/skills/florianbruniaux/token-audit/)
<a href="https://modelsatlas.com/skills/florianbruniaux/token-audit/"><img src="https://modelsatlas.com/skills/florianbruniaux/token-audit/badge.svg" alt="ModelsAtlas: CAUTION B"></a>
Questions about Token Audit
What does the Token Audit skill do?
Is Token Audit safe to install?
What can Token Audit access on my machine?
Which assistants does Token Audit work with?
How current is this page?
Sources
- github.com/FlorianBruniaux/claude-code-ultimate-guide/tree/main/ — the audited source at commit d90170da4369 and every finding aboveObserved · 7 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Token Audit skill do?
- Is Token Audit safe to install?
- What can Token Audit access on my machine?