Agent skill · Testing & QA

repo-stats-autoupdate

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. Use when the README drifts from reality or before publishing a release.

stevesolungithub.com/stevesolunGitHub ↗
claude-codeMIT
Install
npx skills add stevesolun/ctx --skill repo-stats-autoupdate --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 3 KB
Bundled scripts: none
Path: skills/repo-stats-autoupdate/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 569
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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):** ```bash 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:** ```bash python src/update_repo_stats.py # patch README python src/

What's inside
Steps it walks through
  1. What this skill does
  2. How to use it
  3. When NOT to use it
  4. Known gaps (intentionally out of scope)
  5. Related files
Commands it runs
git config core.hooksPath .githooks
python src/update_repo_stats.py          # patch README
python src/update_repo_stats.py --check  # exit 1 if stale (for CI)
More from ctx
All skills →
About this skill
What does the repo-stats-autoupdate skill do?

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. Use when the README drifts from reality or before publishing a release.

How do I install it?

Run `npx skills add stevesolun/ctx --skill repo-stats-autoupdate --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From stevesolun/ctx, a repository with 569 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going