ruvnet / diff-analyze
Analyze git diffs for risk scoring, reviewer recommendations, and change classification. Use when preparing a PR, reviewing a large or cross-module change, or before merging to assess risk and pick reviewers.
0
SKILL.md2.2 KB
Diff Analysis
Analyze git diffs for risk, complexity, and reviewer assignment.
When to use
Before submitting a PR or after making significant changes, analyze the diff to understand risk level, get reviewer recommendations, and classify the type of change.
Steps
- Pick the ref —
HEADfor uncommitted work,main..BRANCHfor a branch (--branch), or the PR's base..head range (--pr, resolve it withgh pr view N --json baseRefName,headRefName). The analyze_* tools take arefand run git themselves; they do not accept diff text. - Analyze diff — call
mcp__plugin_ruflo-core_ruflo__analyze_diffwith{ ref, includeFileRisks: true }for a comprehensive analysis - Risk score — call
mcp__plugin_ruflo-core_ruflo__analyze_diff-riskwith{ ref }for a quantified risk assessment - Classify changes — call
mcp__plugin_ruflo-core_ruflo__analyze_diff-classifywith{ ref }to categorize (feature, bugfix, refactor, etc.) - Get reviewers — call
mcp__plugin_ruflo-core_ruflo__analyze_diff-reviewerswith{ ref, limit }for recommended reviewers based on code ownership - Diff stats — call
mcp__plugin_ruflo-core_ruflo__analyze_diff-statswith{ ref }for line counts, file counts, complexity metrics - File-level risk — call
mcp__plugin_ruflo-core_ruflo__analyze_file-riskwith{ path }(required) for each file the earlier steps flagged
Risk factors
- Files with high churn history
- Security-sensitive paths (auth, crypto, permissions)
- Large diffs (>500 lines)
- Cross-module changes
- Database migration files