Git Risk Analysis

Analyze git history to produce a structured PR risk profile.

Updated Oct 20, 2025
One-click install
npx skills add https://github.com/srirajk/reselience-agent-prototype --skill git-risk-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Git Risk Analysis
Source: https://github.com/srirajk/reselience-agent-prototype/tree/main/.claude/skills/git-risk-analysis
Command: npx skills add https://github.com/srirajk/reselience-agent-prototype --skill git-risk-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill augments PR risk scoring by analyzing historic git activity. It surfaces hotspots, authorship concentration, rollback history, and change complexity to help you understand and mitigate production risk beyond static code analysis.

Core Features & Use Cases

  • Detect Code Hotspots: Identify files with high churn that often correlate with risk.
  • Authorship Concentration: Highlight files touched by many authors to flag coordination risks.
  • Deployment Failure History: Surface past rollbacks or hotfix activity for critical files.
  • Change Complexity: Measure lines changed to assess impact of modifications.
  • Bug Fix Rate Signals: Track recent fixes to gauge code quality.
  • Merge Conflict Frequency: Gauge merge activity and potential integration issues.
  • Use Case: When reviewing a PR, this skill adds context about which files are risk hotspots and who touched them, helping decide if deeper review is needed.

Quick Start

Run the git-risk-analysis skill during PR review to evaluate the touched files in the target branch. The analysis will read the PR metadata from output/pr-<PR_NUMBER>/metadata.json and use git commands to compute the metrics.

Frequently Asked Questions about Git Risk Analysis

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

FAQPage Schema
How do I assess pull request risk using git history?

Git risk analysis evaluates PR risk by examining file churn, authorship patterns, deployment failure history, and change complexity across modified files. Run the skill during PR review to surface hotspots and coordination risks that static analysis alone misses.

What git metrics help identify risky code changes in pull requests?

Key metrics include file hotspot detection (high-churn files), authorship concentration (files touched by many authors), rollback history, merge conflict frequency, and bug fix rates. These indicators signal which files warrant deeper review based on past production issues.

Can I use git history to find files likely to cause deployment failures?

Yes. This skill analyzes past rollbacks and hotfix activity on files modified in the PR, surfacing which files have historically required fixes or rollbacks. This helps predict integration risk before merging.

How do I detect merge conflicts and integration issues before merging?

The skill measures merge conflict frequency on modified files using git history, gauging integration activity and potential coordination problems. High merge frequency on touched files signals integration risk.

What's the difference between static code analysis and git-based risk scoring?

Static analysis examines code content; git-based risk scoring adds behavioral context—who changed files, how often they break, past failures, and authorship spread. Combined, they provide risk signals static tools cannot detect.