Keeps README badge + inline counts in sync with the real number of skills, agents, graph nodes/edges, communities, converted pipelines, and test inventory. Runs automatically on every commit via a git pre-commit hook.
SkillScore91Maintained
Automatic
◆Doc Ops pack
Last verified 8/18/2026
What it changes
Passed 19 of 21 test cases with the skill, and 6 of 21 without it.
Without skill27%
With skill91%
Checks it passed that the model alone missed
ctx-wiki-graphify
.githooks/pre-commit
graph/communities.json
and 13 more in the full report
14 fixed6 passed either way2 still failing0 broke
Pass-rate lift
+64 pp
Tokens
-29%
Agent turns
0%
Response time
-70%
Model gemini-3.6-flashMeasured 8/18/2026v120 of 22 cases passed with skill · 21 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 14 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 14
Prompt
Which Python file contains the core logic for updating repository statistics badges and tables?
What was checked, without and with the skill
Checked
Without skill
With skill
src/update_repo_stats.py
Missed
Passed
case-20 · gemini-3.6-flash · 8/18/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md49 linessingle file
repo-stats-autoupdate
What this skill does
Reads the authoritative sources for the ctx repo's key numbers and patches README.md in place so badges and inline counts never drift:
Number
Source of truth
Skills
~/.claude/skill-wiki/graphify-out/graph.json — count nodes where type == "skill"
Agents
same file — count nodes where type == "agent"
Graph nodes
len(graph["nodes"])
Graph edges
len(graph["edges"]), formatted as 642K / 1.2M
Communities
graph/communities.json → total_communities
Converted pipelines
~/.claude/skill-wiki/converted/ subdir count
Tests
checked-in README/docs inventory by default; set CTX_UPDATE_REPO_STATS_LIVE_TESTS=1 to refresh from pytest --collect-only -q
Fields that can't be resolved (e.g. wiki not deployed) are left untouched — the updater never blocks a commit.
How to use it
One-time install (per clone):
git config core.hooksPath .githooks
After that, every git commit runs .githooks/pre-commit which calls the updater and re-stages README.md if any number drifted.
Manual run:
python src/update_repo_stats.py # patch README
python src/update_repo_stats.py --check # exit 1 if stale (for CI)
CTX_UPDATE_REPO_STATS_LIVE_TESTS=1 python src/update_repo_stats.py # refresh test inventory
When NOT to use it
When you've deliberately phrased a number descriptively (e.g. "over 1,700 skills") — the regex patterns only match exact digits, so prose phrasings are safe, but double-check after big imports.
When the wiki isn't deployed locally. The updater degrades gracefully: it prints a warning and skips fields it can't resolve. It does not invent numbers.