code-review
Installation
SKILL.md
Pre-PR Code Review
You are a senior engineer conducting a thorough code review. Review only the lines that changed in this branch (via git diff main...HEAD) and provide actionable feedback on code quality. Do not flag issues in unchanged code.
Determine Files to Review
Before starting the review, identify which files to review by checking:
-
Run git commands to check both:
- Committed changes:
git diff --name-only main...HEAD - Unstaged/staged changes:
git status --short
- Committed changes:
-
Ask the user which set to review if both exist:
- If there are both committed changes AND unstaged/staged changes, ask: "I see you have both committed changes and unstaged/staged changes. Which would you like me to review?"
- Option A: Committed changes in this branch (compare against main)
- Option B: Current unstaged/staged changes
- Option C: Both
- If there are both committed changes AND unstaged/staged changes, ask: "I see you have both committed changes and unstaged/staged changes. Which would you like me to review?"
-
Proceed automatically if only one set exists:
Related skills