analyze-git-churn
Analyze git history to identify high-churn files and suggest targeted improvements such as refactoring, test coverage, dead code removal, or library…
Skill by tomzx
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/tomzx-analyze-git-churn
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/analyze-git-churn
Tools it pre-approves 4
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
Bash(git:*),Read,Glob,Grep
What's inside
- Skill name
analyze-git-churn- Description
- Analyze git history to identify high-churn files and suggest targeted improvements such as refactoring, test coverage, dead code removal, or library replacements.
- License
- MIT
- Allowed tools
- Bash(git:*),, Read,, Glob,, Grep
- Instructions
- 209 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves some shell commands
Files (1)
- SKILL.md
SKILL.md (first lines)
TODAY=!`date +%Y-%m-%d`
# Git Churn Analysis
Analyzes the git commit history over a chosen period to find the files that changed most frequently, then inspects each high-churn file and produces concrete, prioritized improvement suggestions.
## Prerequisites
- `git` repository with commit history
- Working directory is the root of the repository (or a subdirectory of it)
- Optional: `$1` — period to analyze: `day`, `week`, or `month` (defaults to `week`)
## Period Mapping
| Argument | `--since` value |
|----------|----------------|
| `day` | `1 day ago` |
| `week` | `1 week ago` |
| `month` | `1 month ago` |
If `$1` is not provided, default to `week`.
## Steps
### 1. Determine the Analysis Window
Map `$1` → a `git log --since` value using the table above.
### 2. Collect Churn Data
Run the following to count how many commits touched each file in the window:
```
git log --since="<period>" --name-only --pretty=format: | sort | uniq -c | sort -rn | head -30
```
Also capture per-file insertion/deletion totals to measure change volume:
```
git log --since="<period>" --numstat --pretty=format: | awk 'NF==3 {add[$3]+=$1; del[$3]+=$2; commits[$3]++} END {for (f in commits) printf "%d\t%d\t%d\t%s\n", commits[f], add[f], del[f], f}' | sort -rn | head -30
```
Exclude files that no longer exist (deleted files are noise).
For each candidate path, confirm it still exists:
```
git ls-files --error-unmatch <path> 2>/dev/null
```
### 3. Rank High-Churn Files
Build a ranked table using the commit-count as the primary sort key:
| Rank | File | Commits | Lines Added | Lines Deleted | Net |
|------|------|---------|-------------|---------------|-----|
| 1 | … | N | +X | −Y | Z |
Focus the analysis on the **top 10** files.
If fewer than 3 files show more than 1 commit, widen the period automatically and note the change.
### 4. Inspect Each High-Churn File
For each of the top files:
1. Read the file contents.
2. Review recent commit messages that touched the file:
```
git log --since="<period>" --oneline -- <path>
```
3. Look at the diff for representative recent changes:
```
git diff HEAD~5 HEAD -- <path>
```
### 5. Generate Improvement Suggestions
For each high-churn file, produce a focused set of suggestions drawn from the categories below.
Only include categories that genuinely apply — do not pad with generic advice.
#### Suggestion Categories
**Refactor**
- God class / god function: split into smaller, single-responsibility units
- Repeated logic across files: extract a shared helper or module
- Deeply nested conditionals: flatten with early returns or a state machine
- Mixed abstraction levels in a single function: separate into layers
**Add Tests**
- No test file exists alongside the file
- High churn with few or no tests suggests the code is risky to change
- Recommend specific test types: unit, integration, property-based, snapshot
**Remove Dead Code**
- Functions, methods, or branches that are never called
- Feature flags that are always true or always false
- Config keys that are read but never used
**Extract to a Library / Package**
- Logic that is domain-agnostic and reused (or should be) across the repo
- Utilities that could live in a separate installable package
**Replace with an Existing Library**
- Custom implementations of things well-covered by standard or popular libraries
- Examples: custom retry logic → `tenacity`; custom date parsing → `arrow` or `dateutil`; bespoke HTTP client → `httpx`
**Replace a Library with a Better One**
- Outdated, unmaintained, or poorly-typed dependencies
- Libraries with known issues that have better-maintained alternatives
- Examples: `requests` → `httpx` for async support; `argparse` → `typer` or `click` for ergonomics; `unittest.mock` → `pytest-mock`
**Improve Structure / Architecture**
- Circular imports between modules
- Business logic placed in I/O layers (routes, handlers, CLI entrypoints)
- Configuration scattered across multiple files without a single source of truth
**Documentation**
- Public API with no docstrings or type hints
- Complex algorithm with no explanation of invariantsFrom tomzx/agents, MIT.
More from tomzx/agents
- 0.639score
create-mermaid-visualization
tomzx
Create any Mermaid diagram (flowchart, sequence, class, state, ER, C4, architecture, gantt, mindmap, timeline, pie, sankey, and 20+ more) from a description…
SkillAFreshness: A★ 12Claude Code +9 - 0.639score
communication-guidelines
tomzx
Shared guidelines for writing concise, high-signal outbound communication the agent posts or drafts on the user's behalf, covering GitHub PR and issue…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
audit-functional-suitability
tomzx
Audit whether the software actually does what it should, completely and correctly.
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
create-article
tomzx
Write, update, or revise a high-quality article given a target audience and relevant sources.
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
audit-usability
tomzx
Audit the software's interfaces (CLI, API, and web UI) for usability, the ISO/IEC 25010 characteristic covering recognizability, learnability, operability…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
audit-compatibility
tomzx
Audit the codebase for compatibility, the ISO/IEC 25010 characteristic covering co-existence (running alongside other software without conflict) and…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
analyze-test-coverage
tomzx
Analyze a set of code changes (diff or files) and produce a structured test coverage report with three parts: introduced tests, change coverage, and uncovered…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
audit-attention
tomzx
Audit how your time splits between compounding and depreciating activities using the two-year test.
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
arxiv-article
tomzx
Downloads an arXiv HTML article, converts it to markdown with pandoc, archives it, and returns a structured summary.
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
arxiv-catchup
tomzx
Fetches new arXiv cs.AI papers published since the last processed date, processes each paper's HTML version via the arxiv-article skill, and advances the date…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
attach-assets
tomzx
Upload files (images, logs, screenshots) to a dedicated orphan branch in the repository and embed them in a GitHub issue or PR comment or description, so…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
audit-maintainability
tomzx
Audit the codebase for maintainability, the ISO/IEC 25010 characteristic covering modularity, reusability, analyzability, modifiability, and testability.
SkillAFreshness: A★ 12Claude Code +9
Signals
- Stars
- 12
- Forks
- 1
- Open issues
- 16
- Last commit (this folder)
- Oct 7, 2026 (21 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/tomzx/agents
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from tomzx
- 0.639score
create-mermaid-visualization
tomzx
Create any Mermaid diagram (flowchart, sequence, class, state, ER, C4, architecture, gantt, mindmap, timeline, pie, sankey, and 20+ more) from a description…
SkillAFreshness: A★ 12Claude Code +9 - 0.639score
communication-guidelines
tomzx
Shared guidelines for writing concise, high-signal outbound communication the agent posts or drafts on the user's behalf, covering GitHub PR and issue…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
audit-usability
tomzx
Audit the software's interfaces (CLI, API, and web UI) for usability, the ISO/IEC 25010 characteristic covering recognizability, learnability, operability…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
create-article
tomzx
Write, update, or revise a high-quality article given a target audience and relevant sources.
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
analyze-test-coverage
tomzx
Analyze a set of code changes (diff or files) and produce a structured test coverage report with three parts: introduced tests, change coverage, and uncovered…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
arxiv-article
tomzx
Downloads an arXiv HTML article, converts it to markdown with pandoc, archives it, and returns a structured summary.
SkillAFreshness: A★ 12Claude Code +9
Cite this page
analyze-git-churn skill. Agent Mart. https://agentmart.dev/skills/tomzx-analyze-git-churn (last updated 2026-10-24)