review-diff

Reviews a git diff and returns structured Copilot-style feedback without modifying files.

Updated Mar 29, 2024
One-click install
npx skills add https://github.com/petobens/ai-harness --skill review-diff-petobens
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-diff
Source: https://github.com/petobens/ai-harness/tree/main/skills/review-diff
Command: npx skills add https://github.com/petobens/ai-harness --skill review-diff-petobens

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Before merging changes, developers need a consistent, thorough code review of their git diff, but manual reviews are time-consuming and often inconsistent in structure and depth. ## Core Features & Use Cases - Structured Review Output: Produces a fixed four-section report covering an overview, reviewed changes, material comments, and a final readiness verdict. - Flexible Diff Resolution: Reviews staged changes by default, a diff against a base branch, or a specific commit, in any repository path. - Material-Findings Focus: Reports only correctness, regression, security, performance, and maintainability issues worth fixing before merge, skipping cosmetic nitpicks. - Use Case: Before merging a feature branch, ask for a review of the diff against main and receive a GitHub Copilot-style assessment ending with an explicit ready or not-ready verdict. ## Quick Start Review the staged changes in this repository and give me structured feedback with a readiness verdict.

Frequently Asked Questions about review-diff

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

FAQPage Schema
How do I review a git diff before merging a branch?

Run a review of the diff against your base branch using git diff BASE...HEAD and receive structured feedback. The review covers an overview, changed files, material findings, and ends with a ready or not-ready-to-commit verdict.

How to review staged changes with git?

Staged changes are reviewed by default using git diff --staged. The review inspects the diff plus surrounding code and repository guidance to validate the changes in context before reporting findings.

Can I review a specific commit instead of staged changes?

Yes, provide a commit SHA and the review resolves the diff with git diff SHA^!. You can also point the review at a specific repository path so all git commands run there.

Does a diff review modify my files?

No, the review is read-only and never changes files. It only inspects the diff and surrounding code, then returns written feedback with findings and recommendations.

What kinds of issues does a code diff review report?

It reports material findings: correctness problems, regressions, security or performance concerns, and clear maintainability issues worth fixing before merge. Cosmetic nitpicks and speculative suggestions are deliberately omitted.

What happens when there is nothing to review in the diff?

If the resolved diff is empty, the review stops and reports that there is nothing to review. If a non-empty diff has no material findings, the comments section states that plainly.