Context Audit
Token-hygiene audit of the always-loaded context stack, CLAUDE.md, AGENTS.md...
Install
npx skills add garrytan/gbrain --skill context-audit -g -a claude-code -y- Repository
- garrytan/gbrain31.4k
- Category
- AI and agents
- Updated
- 3d ago
- License
- MIT
- Context cost
- Mediumabout 2,896 tokens
- Runs scripts
- No, instructions only
What it does
Token-hygiene audit of the always-loaded context stack, CLAUDE.md, AGENTS.md, auto-memory MEMORY.md, and the bootstrap-rendered identity files (SOUL.md, USER.md, ACCESS_POLICY.md, HEARTBEAT.md) or their harness equivalents. Finds redundancy, contradictions, stale content, compression candidates, and skill-extraction candidates; produces a ranked action list sorted by token savings with a risk class per finding. REPORT-ONLY: this skill never edits any audited file. Recommendations for bootstrap-rendered files target the interview answer bank / templates, never the rendered output. Judging routes through `gbrain eval cross-modal` (single cheap model by default; full multi-model panel is explicit opt-in).
context-audit, Token Hygiene for the Always-Loaded Context Stack
Convention: see conventions/brain-first.md , before running a fresh audit, check the brain for prior audit reports (
gbrain recall "context audit report") so you can compute token DRIFT since the last run and avoid re-flagging findings the user already declined.Convention: see conventions/quality.md, > every finding cites its file and evidence; no unsourced claims.
What this is
Every file that loads on every turn is a per-turn tax: tokens, latency, and, past a point, instruction-following quality. Always-loaded files accrete (append-only release notes, promoted memory blocks nobody re-reads, rules restated in three files that drift into contradiction). This skill audits the whole always-loaded stack at once and returns a ranked, evidence-cited action list sorted by token savings.
It is an auditor, not a surgeon. It measures, finds, ranks, and recommends. The user (or a skill the user explicitly invokes afterward) applies changes.
Scope: what counts as "always-loaded"
Enumerate what THIS harness actually loads every turn, do not assume a fixed list. Typical stack:
| File | Role | Fix belongs in |
|---|---|---|
project CLAUDE.md / AGENTS.md | orientation, routing, invariants | the file itself (source-editable) |
user-global CLAUDE.md | cross-project instructions | the file itself (source-editable) |
auto-memory MEMORY.md | promoted memory blocks | the memory store (demote/expire) |
SOUL.md, USER.md, ACCESS_POLICY.md, HEARTBEAT.md, rendered AGENTS.md | bootstrap-rendered identity files | the interview answer bank / templates, NEVER the rendered file |
| harness system-prompt fragments (identity/tools files) | per-harness | wherever that harness sources them |

