analyze-code-churn

analyze-code-churn is a skill for Claude Code, Codex from cpliakas/claude-code-engineering-leaders. It costs 59 tokens per session (3,240 once invoked), scanned A, original, MIT.

A skill that examines how often and where files in a Git repository change over time. Code churn means repeated changes to the same code, which can indicate rework or ongoing friction.

In plain words
What is it for?
It is for repository health checks, sprint retrospectives, code-review investigations, and comparing change patterns across time or paths.
Why use it?
It helps reveal hotspots and recurring changes that ordinary code review may miss.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/cpliakas/claude-code-engineering-leaders/analyze-code-churn
Any agent
npx skills add cpliakas/claude-code-engineering-leaders --skill analyze-code-churn
Clone the repo
git clone --depth 1 https://github.com/cpliakas/claude-code-engineering-leaders

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyze-code-churn

README.md
[![agentmods](https://agentmods.dev/badge/skills/cpliakas/claude-code-engineering-leaders/analyze-code-churn.svg)](https://agentmods.dev/skills/cpliakas/claude-code-engineering-leaders/analyze-code-churn)
Your own site
<a href="https://agentmods.dev/skills/cpliakas/claude-code-engineering-leaders/analyze-code-churn"><img src="https://agentmods.dev/badge/skills/cpliakas/claude-code-engineering-leaders/analyze-code-churn.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,240 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00059 $0.03240
Opus 5 $0.00030 $0.01620
Sonnet 5 $0.00012 $0.00648
Haiku 4.5 $0.00006 $0.00324

Measured 5d ago against content hash 05f06bad4dc6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

analyze-code-churn scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/analyze-code-churn/SKILL.md · 339 lines

How it starts

The opening of the file, as written. The whole thing — 339 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Analyze Churn

Analyze code churn and thrash patterns in a git repository. Produces a structured report with hotspot detection, rework vs. refactor classification, temporal coupling analysis, and severity-rated findings with investigation recommendations.

Input

$ARGUMENTS = analysis scope — time window (e.g., "30 days", "last sprint", "since v2.1"), optional path filter (e.g., "src/api/"), and optional focus area (e.g., "why is auth churning", "sprint-over-sprint comparison").

Process

1. Parse Scope

Extract from $ARGUMENTS:

  • Time window: Default to 30 days if not specified. Accept natural language ("last sprint", "since January") and convert to --since/--after git flags.
  • Path filter: If a directory or file pattern is specified, scope all git commands to that path. Default to the entire repository.
  • Focus area: If a specific question is asked, tailor the analysis toward answering it. Otherwise, produce the full report.

If $ARGUMENTS is empty, use a 30-day window across the entire repository.

2. Establish Baseline

Run the baseline period (the window immediately preceding the analysis window) to enable trend comparison. For a 30-day analysis window, the baseline is the prior 30 days.

Gross churn (analysis window):

git log --numstat --format="" --no-merges --since="<start>" -- <path> \
  | awk '{a+=$1; d+=$2} END {print "added:", a, "deleted:", d, "gross:", a+d}'

Gross churn (baseline window):

git log --numstat --format="" --no-merges --since="<baseline_start>" --until="<start>" -- <path> \
  | awk '{a+=$1; d+=$2} END {print "added:", a, "deleted:", d, "gross:", a+d}'

Commit counts (both windows):

git rev-list --count --no-merges --since="<start>" HEAD -- <path>
git rev-list --count --no-merges --since="<baseline_start>" --until="<start>" HEAD -- <path>

Record the baseline metrics for trend comparison in Step 7.

3. Detect Hotspots

Identify files with the highest change frequency, weighted by size as a complexity proxy.

Read the full file on GitHub · 339 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 339 lines · 59 tokens per session scan A 05f06bad4dc6

Subscribe to this mod's changes

analyze-code-churn is a skill published in the GitHub repository cpliakas/claude-code-engineering-leaders (4 stars, last pushed 13d ago), licensed MIT. It adds 59 tokens to every session and 3,240 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens