← ClaudeAtlas

codebase-churnlisted

Analyze a git repository's history and produce an SVG treemap of file churn — area = lines changed, color = commit frequency. Use when user wants to find unstable areas of a codebase, predict bug-prone files, see "where do we change the most", spot refactor candidates, or invokes /codebase-churn.
risadams/skills · ★ 2 · Code & Development · score 65
Install: claude install-skill risadams/skills
# codebase-churn Generate a churn treemap from git history. Premise: files changed often (high commits) and heavily (high line churn) tend to harbor more bugs. Stable files are usually safer. Big + hot tiles are where to look first. ## Quick start From the target repo: ```bash python3 ~/.claude/skills/codebase-churn/scripts/churn_treemap.py \ -o churn-treemap.svg --report churn-report.md ``` Open `churn-treemap.svg` in a browser. Hover any tile for path, commit count, lines added/deleted. ## Output - **SVG treemap** — area = total lines changed (added + deleted); color = commit count on a log scale (blue = stable → red = volatile). - **Markdown report** (`--report PATH`) — ranked table of top files for tracking over time or pasting into a doc. ## How to read it | Tile | Meaning | Action | | :--- | :--- | :--- | | Big + red | Frequent and heavy edits | Refactor candidate. Likely under-tested. Bug-prone. | | Big + blue | One large rewrite, then quiet | Probably stabilized. Verify it has tests. | | Small + red | Many tiny touches (configs, version bumps) | Often a noisy interface or fragile contract. | | Small + blue | Stable | Safe to leave alone. | ## Common flags - `--since "6 months ago"` — restrict the window. Defaults to all history. - `--until "2026-01-01"` — pair with `--since` to compare windows. - `--top 100` — limit how many files appear (default 200). - `--exclude REGEX` — repeatable. Lockfiles, `node_modules/`, `dist/`, `*.min.*` are excluded by default