Code Quality Tool

Git Analyzer

Analyze git history to find file hotspots, contributor stats, activity trends, and branch/tag counts. Understand where risk hides in your repository.

Get the CLI Tool

Run the git analyzer locally as an MCP server, or try the interactive demo below.

npx @clinetools/git-analyzer
Requires Node.js 18+ and Git
  • File hotspot detection — finds the most-changed files in your history
  • Contributor stats — commits, lines added/removed, active periods
  • Activity trend charts — commit frequency over weeks and months
  • Branch and tag counts — release cadence and branching strategy
  • Zero config — just point it at any git repository

How to Use It

Three ways to analyze your git history — pick the one that fits your workflow.

1

Try Online

Explore the interactive demo below to see git analysis results on sample repositories.

2

Use via CLI

Run as a local MCP server and connect any MCP-compatible client.

npx @clinetools/git-analyzer
3

Add to Cline / Claude Code

Add the tool to your MCP settings for instant access from your AI assistant.

"git-analyzer": { "command": "npx", "args": ["@clinetools/git-analyzer"] }

MCP Client Configuration

{
  "mcpServers": {
    "git-analyzer": {
      "command": "npx",
      "args": ["@clinetools/git-analyzer"]
    }
  }
}

Example: Analyze Repository

// Prompt to your AI agent:
"Analyze the git history of this project"

// The agent calls:
analyze_git({ path: "." })

// Output:
{
  "summary": {
    "totalCommits": 342,
    "authors": 5,
    "branches": 8,
    "tags": 12
  },
  "hotspots": [
    { "file": "src/api/handler.ts", "commits": 87, "authors": 4, "lastModified": "2026-02-01" },
    { "file": "src/utils/auth.ts", "commits": 64, "authors": 3, "lastModified": "2026-01-28" }
  ],
  "contributors": [
    { "name": "alice", "commits": 156, "linesAdded": 12400, "linesRemoved": 4200 }
  ]
}

Example: Find Risky Files

// Prompt to your AI agent:
"Which files in this repo change the most and
have the fewest contributors? Those are our
highest-risk files for knowledge concentration."

// The agent analyzes the git history, identifies
// hotspots with single-author ownership, and
// flags bus factor risks in the codebase.
Live Demo

Try It Online

Select a sample repository to see hotspots, contributors, and activity trends.

Repository Summary

File Hotspots

FileCommitsAuthorsChurnLast Modified

Contributors

Activity Over Time

Why Git Analysis Matters

Your git history is a goldmine of insights about code health, team dynamics, and risk.

File Hotspots

The most frequently changed files are statistically the most likely to contain bugs. Research shows that churn rate is a stronger predictor of defects than code complexity alone.

Bus Factor

When only one person has ever touched a critical file, your team has a bus factor of one. Git analysis reveals knowledge concentration so you can cross-train before it becomes a crisis.

Commit Velocity

Activity trends reveal project health at a glance. Declining commit rates may signal abandonment, while sudden spikes often precede release deadlines and rushed, bug-prone code.

Code Ownership

Understanding who owns which parts of the codebase helps route code reviews to the right people, speeds up onboarding, and ensures institutional knowledge is documented.

Churn vs Complexity

Files that change often AND have high complexity are your highest-risk code. Combining git churn data with complexity metrics pinpoints the exact danger zones that need refactoring first.

Need Continuous Repository Insights?

Our Pro plan includes scheduled analysis with trend reports and automated risk alerts for your team.

View Plans