git-diagnosis

Diagnoses codebase health by cross-analyzing Git history churn, bug clusters, and contributor activity.

1|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/psw7205/skills --skill git-diagnosis-psw7205
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: git-diagnosis
Source: https://github.com/psw7205/skills/tree/main/skills/git-diagnosis
Command: npx skills add https://github.com/psw7205/skills --skill git-diagnosis-psw7205

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When joining a new project or auditing an unfamiliar repository, it is hard to know which files are risky, where bugs concentrate, and what to read first. This Skill answers those questions using only Git history, without opening the code. ## Core Features & Use Cases - Hotspot Detection: Cross-analyzes change frequency (Churn) and bug-fix density (Bug Clusters) to identify files that change often and break often. - Ownership Gap Analysis: Checks whether the main contributors of high-risk files are still active, surfacing knowledge ownership gaps. - Prioritized Reading Order: Outputs a diagnostic report with high-risk files and a recommended exploration order for onboarding or audits. - Use Case: You just joined a team maintaining a large legacy repo. Run the diagnosis to get a list of the riskiest files, who owns them, and where to start reading first. ## Quick Start Ask the AI to diagnose this repository's health using its Git history and show the high-risk hotspots.

Frequently Asked Questions about git-diagnosis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find high-risk files in a Git repository?▼

Cross-analyze change frequency (churn) with bug-fix commit density to find files that appear in both top lists. Files that change often and break often are the highest-risk hotspots in a codebase.

How to analyze codebase health using Git history?▼

Extract churn with git log --name-only, bug clusters by grepping fix/bug commits with word boundaries, and contributor distribution. Then intersect these metrics to identify hotspots, complexity, and ownership gaps.

Does Git history analysis work on shallow clones?▼

No, shallow clones have incomplete history and silently produce truncated results. Check with git rev-parse --is-shallow-repository and run git fetch --unshallow before diagnosing, or note the limitation in findings.

Why does bug commit analysis catch false positives like debugger?▼

A plain grep for bug matches words like debugger or debug. Use word-boundary filtering such as grep -w or post-process the pipeline with grep -v to exclude noise terms from bug cluster counts.

What are the limitations of Git-based codebase diagnosis?▼

Results are unreliable with very few commits, poor commit message quality, heavy bot activity like dependabot, squash-merge workflows that distort authorship, and file renames that split churn counts across paths.