context-audit
Skill7 starsChanged 27 days agoMITView on GitHub
Context health monitoring. Analyzes include loading trends from context-metrics.log, audits CLAUDE.md/rules/settings for bloat, scores setup health. Modes: trend (default), full (with /context data), baseline (save snapshot).
19 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- nordz0r/skillstheir own version, first seen Nov 1, 2026
- adamlinscott/claude-skillstheir own version, first seen Oct 30, 2026
- CharlesLadera/claude-custom-skillstheir own version, first seen Oct 25, 2026
- garrytan/gbraintheir own version, first seen Oct 17, 2026
- edenbuilds/agentlooptheir own version, first seen Oct 13, 2026
- Playful-Sincerity/PSDCMS-Playful-Sincerity-Digital-Core-Meta-Systemtheir own version, first seen Oct 11, 2026
Used with
Projects with it also use skillify and handoff.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillskillify
Capture a repeatable process from the current session into a reusable Amplifier SKILL.md skill file. Use when the user wants to create a skill, save a workflow as a skill, turn a process into a reusable skill, or mentions "skillify", "create skill", "make a skill", "save as skill", "capture workflow", "turn this into a skill", "new skill", or wants to automate a repeatable process they just performed.
Also in 3 projects that use this
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 4 projects that use this
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- Vesely/skills★ 2819% same
- arielnishri-svg/claude-skills★ 125% same
- mj-deving/pai-skills★ 025% same
Wrote their own version · 16
- garrytan/gbrain★ 32ksame name
- Neeeophytee/finding-unknowns-skills★ 339same name
- jiahao-shao1/sjh-skills★ 43same name
- Sapere-IA/sdd-onboarding-kit★ 19same name
- WalletConnect/skills★ 14same name
- weellio/gander★ 10same name
- nordz0r/skills★ 8same name
- tstapler/dotfiles★ 8same name
- adamlinscott/claude-skills★ 3same name
- TIKAZI/TIKAZ-Codex-Context-Economy★ 3same name
6 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository58 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- a11y-auditSkill
- agent-benchmarkSkill
- api-auditSkill
- architectureSkill
- backlogSkill
- benchmarkSkill
- brainstormSkill
- buildSkill
- canarySkill
- ci-auditSkill
- code-auditSkill
- container-auditSkill
- content-auditSkill
- content-expandSkill
- content-fixSkill
- content-migrationSkill
- db-auditSkill
- debugSkill
- dependency-auditSkill
- deploySkill
- design-reviewSkill
- designSkill
- docsSkill
- env-auditSkill
- executeSkill
- fix-testsSkill
- geo-auditSkill
- geo-fixSkill
- incidentSkill
- infra-auditSkill
- leadsSkill
- mutation-testSkill
- pentestSkill
- performance-auditSkill
- planSkill
- presentationSkill
- profile-sessionSkill
- receive-reviewSkill
- refactor-radarSkill
- refactorSkill
- release-docsSkill
- retroSkill
- reviewSkill
- security-auditSkill
- seo-auditSkill
- seo-fixSkill
- shipSkill
- skill-evalSkill
- structure-auditSkill
- test-auditSkill
- tests-performanceSkill
- ui-design-teamSkill
- using-zuvoSkill
- worktreeSkill
- write-articleSkill
- write-e2eSkill
- write-testsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 4 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 19 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
Read ~/.zuvo/runs.log — the single source of truth for all skill run data:
- Very specific: line 49
If fewer than 3 entries with INCLUDES data: print "Not enough data yet.
- Very specific: line 55
Check conversation history for /context output.
- Very specific: line 59
STOP HERE in --full mode: Do not proceed until the user provides /context data.
- Distinctive: line 110
If enough data exists (>14 days), compare this week vs last week:
- Very specific: line 133
Only runs when --full flag is provided AND /context data is available.
- Very specific: line 143
Read all files listed in /context Memory section.
- Distinctive: line 159
Check for restated goals or synonymous instructions
- Very specific: line 163
Check the global and project settings files (e.g., settings.json):
- Very specific: line 171
Check settings.json for permissions.deny rules.
- Very specific: line 313
Add the missing settings.json configs
- Distinctive: line 314
Add permissions.deny rules for build artifacts"
- Very specific: line 321
Follow the retrospective protocol from retrospective.md.
- Distinctive: line 323
If gate check skips: print "RETRO: skipped (trivial session)" and proceed.
- Very specific: line 331
Append via wrapper (REQUIRED): Never >> directly to ~/.zuvo/runs.log — the wrapper is the gate that verifies a retro entry exists for this …
“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
zuvo:context-audit — Context Health Monitor
Tracks what fills your context window over time and flags waste. Two data sources:
- Auto-collected —
~/.zuvo/runs.logfield 12 (name:bytespairs, populated bytrack-includes.shhook on every Read) - Manual —
/contextoutput (optional, for full system-level audit)
Argument Parsing
| Flag | Effect |
--full | Full audit: requires /context data. Audits MCP, CLAUDE.md, settings, permissions |
--baseline | Save current state as baseline for future delta comparisons |
--since N | Show trend for last N days (default: 7) |
| (no flags) | Trend mode: analyze context-metrics.log, show include loading patterns |
Mandatory File Loading
Read these files:
CORE FILES LOADED:
1. ../../shared/includes/run-logger.md -- READ
2. ../../shared/includes/retrospective.md -- READPhase 0: Collect Data
Metrics data (from runs.log)
Read ~/.zuvo/runs.log — the single source of truth for all skill run data:
RUNS_LOG="$HOME/.zuvo/runs.log"Filter entries that have INCLUDES data (field 12 contains :). These are v3+ entries with name:bytes format.
# Extract v3 entries (field 12 has name:bytes pairs)
awk -F'\t' 'NF>=12 && $12 ~ /:/' "$RUNS_LOG"If fewer than 3 entries with INCLUDES data: print "Not enough data yet. Run a few zuvo skills first — the track-includes.sh hook captures include sizes automatically." and exit.
Parse field 12 as name:bytes|name:bytes pairs. Calculate per-include sizes and cumulative costs directly from this field. No separate metrics file needed.
/context data (--full mode only)
Check conversation history for /context output. If not found:
"Run /context in this session and let me know when you're done. I need the token breakdown to audit your full setup."
STOP HERE in --full mode. Do not proceed until the user provides /context data.
In default trend mode: skip this step entirely, proceed with metrics data.
Phase 1: Trend Analysis (default mode)
Parse context-metrics.log for the --since period (default 7 days).
1.1 Include Loading Frequency
Count how many times each include was loaded across all skill runs:
TOP INCLUDES (last 7 days, N skill runs)
# INCLUDE LOADS AVG_SIZE CUMULATIVE
1 env-compat.md N/N 1.5K NK
2 codesift-setup.md N/N 1.5K NK
3 run-logger.md N/N 4.4K NK
4 cq-patterns.md N/N 27.0K NK
...Flag includes with cumulative >100K as ⚠ HIGH CUMULATIVE COST.
1.2 Heaviest Runs
Find the top 3 skill runs by INCLUDES_BYTES:
HEAVIEST RUNS
1. refactor @ project — 14 includes / 82K
2. review @ project — 10 includes / 58K
3. execute @ project — 12 includes / 71K1.3 Tier Distribution
Per-skill breakdown of tier usage (from TIER field):
TIER DISTRIBUTION
review: tier-0: 5 tier-1: 3 tier-2: 8 tier-3: 2
write-tests: LIGHT: 4 STANDARD: 8 HEAVY: 2
build: LIGHT: 3 STANDARD: 5 DEEP: 11.4 Week-over-Week Delta
If enough data exists (>14 days), compare this week vs last week:
TREND (this week vs last)
Avg includes/run: 7.2 → 6.8 ↓ 6%
Avg bytes/run: 42K → 38K ↓ 10%
Total skill runs: 23 → 19 ↓ 17%1.5 Recommendations
Based on the data, generate actionable recommendations:
| Condition | Recommendation |
| Any include with cumulative >200K | "Consider splitting [file] — loaded N times at XK each" |
| Any run with >100K includes bytes | "[skill] runs are heavy — check if all includes are necessary at its tier" |
| Same include loaded by >80% of runs | "Consider inlining [file] essentials into env-compat or making it a hook" |
| Include that grew >20% since baseline | "[file] grew from XK to YK — review recent additions" |
Phase 2: Full Audit (--full mode only)
Only runs when --full flag is provided AND /context data is available.
2.1 MCP Servers
From /context output, count MCP servers and their tool counts. Flag:
- Servers with >30 tools (high token cost per definition)
- Servers with CLI alternatives (playwright → npx playwright, github → gh)
2.2 Memory Files
Read all files listed in /context Memory section. For each, apply 5 filters:
| Filter | Flag when... |
| Default | Claude already does this without being told |
| Contradiction | Conflicts with another rule in same or different file |
| Redundancy | Repeats something already covered elsewhere |
| Bandaid | Added to fix one bad output, not improve outputs generally |
| Vague | Interpreted differently every time ("be natural") |
Count total lines. Flag if >200 lines combined.
2.3 Skills
From /context Skills section, for each skill >120 tokens:
- Flag as "consider trimming description"
- Check for restated goals or synonymous instructions
2.4 Settings
Check the global and project settings files (e.g., settings.json):
| Setting | Flag if | Recommended |
| autocompact_percentage_override | Missing or >80 | 75 |
2.5 File Permissions
Check settings.json for permissions.deny rules. If missing, check whether bloat directories exist:
| If exists... | Should deny... |
| package.json | node_modules, dist, build, .next, coverage |
| Cargo.toml | target |
| go.mod | vendor |
| pyproject.toml | pycache, .venv |
2.6 Retro-gate bypass check
Surface every ZUVO_SKIP_RETRO_GATE=1 use recorded by append-runlog to
$ZUVO_HOME/skip-retro-gate.log (default ~/.zuvo/skip-retro-gate.log).
Schema: # v1 SKIP\tDATE\tSKILL\tPROJECT\tNOTE. Run this and fold the count
into the report (each bypass skipped a durability gate = an unverified run):
# >>> zuvo:skip-audit (plan Task 9 — surface retro-gate bypasses)
_SL="${ZUVO_HOME:-$HOME/.zuvo}/skip-retro-gate.log"
if [ -f "$_SL" ]; then
_n=$(grep -c '^SKIP:' "$_SL" 2>/dev/null) || true; _n=${_n:-0}
echo "Retro-gate bypasses (ZUVO_SKIP_RETRO_GATE): $_n"
if [ "$_n" -gt 0 ]; then
echo " recent (skill / project / date):"
grep '^SKIP:' "$_SL" | tail -5 | awk -F'\t' '{printf " - %s / %s / %s\n",$3,$4,$2}'
fi
else
echo "Retro-gate bypasses: 0 (no skip-retro-gate.log)"
fi
# <<< zuvo:skip-auditCross-reference any nonzero skill/project against missing retros in retros.log.
Phase 3: Score and Report
Scoring (--full mode)
Score starts at 100. Deduct per issue:
| Issue | Points |
| Memory files >200 lines total | -10 |
| Memory files >500 lines total | -20 |
| Per 5 rules flagged by filters | -5 |
| Contradictions between files | -10 |
| Missing autocompact override | -10 |
| Skill >120 tokens | -3 each |
| Per MCP server | -3 each |
| No deny rules + bloat dirs exist | -10 |
Floor at 0. Labels: 90-100 CLEAN, 70-89 NEEDS WORK, 50-69 BLOATED, 0-49 CRITICAL.
Scoring (trend mode)
Score based on metrics data:
| Condition | Points |
| Avg bytes/run <30K | +20 |
| Avg bytes/run 30-60K | +10 |
| Avg bytes/run >60K | 0 |
| Week-over-week improving (↓) | +10 |
| Week-over-week stable | +5 |
| Week-over-week degrading (↑ >10%) | -10 |
| No include >200K cumulative | +10 |
| Any include >200K cumulative | -5 per file |
Base 50 + adjustments. Same labels.
Output Format
# Context Audit
Score: {N}/100 [{CLEAN|NEEDS WORK|BLOATED|CRITICAL}]
Mode: {trend|full}
Period: {last N days} ({M skill runs})
## Include Loading
{Phase 1.1 table}
## Heaviest Runs
{Phase 1.2 table}
## Tier Distribution
{Phase 1.3 table}
## Trend
{Phase 1.4 delta, or "Not enough data for trend"}
## Issues Found
### [{CRITICAL|WARNING|INFO}] {Category}
{What's wrong}
Fix: {One-line actionable fix}
## Recommendations
{Phase 1.5 or Phase 2 recommendations, ranked by impact}
## Top 3 Fixes
1. {Highest-impact fix}
2. {Second}
3. {Third}Phase 4: Baseline (--baseline mode)
Save current metrics snapshot to ~/.zuvo/context-baseline.json:
{
"date": "2026-04-12",
"avg_includes_per_run": 7.2,
"avg_bytes_per_run": 38000,
"total_runs": 23,
"top_includes": {
"env-compat": {"loads": 23, "size": 1500},
"cq-patterns": {"loads": 8, "size": 27000}
},
"include_sizes": {
"env-compat.md": 1500,
"codesift-setup.md": 1500,
"cq-patterns.md": 27000
}
}Print: "Baseline saved. Run zuvo:context-audit again after your next changes to see the delta."
Phase 5: Offer to Fix (--full mode only)
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"
Auto-apply settings.json and permissions.deny (safe, reversible). Show diffs for CLAUDE.md — let the user confirm before modifying instruction files.
Retrospective (REQUIRED)
Follow the retrospective protocol from retrospective.md.
Gate check → structured questions → TSV emit → markdown append.
If gate check skips: print "RETRO: skipped (trivial session)" and proceed.
Output
Run: <ISO-8601-Z> context-audit <project> - - <VERDICT> - <mode> <NOTES> <BRANCH> <SHA7> <INCLUDES> <TIER>Append via wrapper (REQUIRED). Never >> directly to ~/.zuvo/runs.log — the wrapper is the gate that verifies a retro entry exists for this run. Order: retro bash executed → wrapper invoked → completion claimed.
printf '%b\n' "$RUN_LINE" | ~/.zuvo/append-runlogExpected stdout: OK: appended to runs.log (retro verified for <skill> on <project>). If exit 2 with RETRO_REQUIRED — go execute the retro bash from retrospective.md first; never bypass with ZUVO_SKIP_RETRO_GATE=1. After the wrapper succeeds, print a Logs: evidence line (tail -1 ~/.zuvo/retros.log, grep -c "^<!-- RETRO -->" ~/.zuvo/retros.md, tail -1 ~/.zuvo/runs.log) before claiming completion. Printing the markdown retro section without executing the bash leaves all three log files empty.
Include sizes are captured automatically by the track-includes.sh PostToolUse hook and written to runs.log field 12 as name:bytes pairs. No separate metrics file or manual collection needed.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

