Use when adding new error messages to React, or seeing "unknown error code" warnings.
npx skills add Nghi-NV/create-agent-skills --skill "git-review"
Install specific skill from multi-skill repository
# Description
Guide for conducting effective code reviews. Use when reviewing PRs, giving feedback, or establishing review standards.
# SKILL.md
name: git-review
description: Guide for conducting effective code reviews. Use when reviewing PRs, giving feedback, or establishing review standards.
Git Code Review
This skill provides guidance for conducting thorough, constructive code reviews that improve code quality and team collaboration.
When to Use This Skill
- Reviewing Pull Requests
- Giving constructive feedback
- Setting up review processes
- Training new reviewers
Review Mindset
[!IMPORTANT]
Review the code, not the person. Focus on improving the codebase, not criticizing the author.
Approach reviews with:
- Curiosity, not judgment
- Suggestions, not demands
- Collaboration, not gatekeeping
Review Checklist
Functionality
- [ ] Code does what PR description says
- [ ] Edge cases handled
- [ ] Error handling appropriate
- [ ] No obvious bugs
Code Quality
- [ ] Code is readable and clear
- [ ] Functions/methods have single responsibility
- [ ] No code duplication (DRY)
- [ ] Variable/function names are descriptive
- [ ] Complex logic has comments
Testing
- [ ] Tests cover new functionality
- [ ] Tests cover edge cases
- [ ] Existing tests still pass
- [ ] Test names are descriptive
Security
- [ ] No hardcoded secrets/credentials
- [ ] Input validation present
- [ ] No SQL injection vulnerabilities
- [ ] Authentication/authorization correct
Performance
- [ ] No N+1 queries
- [ ] Appropriate data structures used
- [ ] No unnecessary loops/iterations
- [ ] Resources properly released
Documentation
- [ ] Public APIs documented
- [ ] Complex logic explained
- [ ] README updated if needed
- [ ] CHANGELOG updated if needed
Comment Types
Use prefixes to clarify intent:
| Prefix | Meaning | Blocking? |
|---|---|---|
nit: |
Minor nitpick, optional | β No |
suggestion: |
Improvement idea | β No |
question: |
Need clarification | β No |
issue: |
Problem that needs fixing | β Yes |
blocker: |
Must fix before merge | β Yes |
Examples:
nit: Consider renaming this to `userCount` for clarity.
suggestion: This could be simplified using Array.filter().
question: Why do we need this null check here?
issue: This will throw an error if `data` is undefined.
blocker: This exposes user passwords in the response.
Giving Feedback
Do β
+ "Consider using a Map here for O(1) lookup instead of array.find()"
+ "This could potentially throw if user is null - maybe add a null check?"
+ "Nice solution! One thing to consider: what happens if the list is empty?"
Don't β
- "This is wrong"
- "Why would you do it this way?"
- "This is bad code"
Feedback Formula
[Observation] + [Impact/Reason] + [Suggestion]
Example:
"This function is 80 lines long (observation), which makes it harder to test and maintain (impact). Consider extracting the validation logic into a separate function (suggestion)."
Review Response Times
| PR Size | Target Response |
|---|---|
| XS (< 50 lines) | Same day |
| S (50-200) | Within 24 hours |
| M (200-400) | Within 48 hours |
| L (> 400) | Schedule review session |
[!TIP]
Quick reviews (even partial) are better than delayed perfect reviews.
Approval Criteria
Approve when:
- All blocking issues resolved
- Code works as intended
- Tests pass and cover changes
- No security concerns
Request changes when:
- Blocking bugs or issues
- Security vulnerabilities
- Missing required tests
- Breaking changes unaddressed
Comment (no approval) when:
- Have questions but no blockers
- Need more context
- Partial review completed
Decision Tree
Reviewing a PR
βββ Read PR description first
β βββ Understand the "what" and "why"
βββ Check diff size
β βββ > 400 lines β Ask to split or schedule session
β βββ Manageable β Continue review
βββ Review code
β βββ Start with tests (understand intent)
β βββ Review main implementation
β βββ Check edge cases
βββ Leave comments
β βββ Blocking issues β Use "issue:" or "blocker:"
β βββ Suggestions β Use "suggestion:" or "nit:"
β βββ Questions β Use "question:"
βββ Submit review
βββ All good β Approve
βββ Has blocking issues β Request changes
βββ Need more info β Comment only
Review Best Practices
| Practice | Description |
|---|---|
| Be timely | Review within 24 hours |
| Be thorough | Don't just skim |
| Be specific | Point to exact lines |
| Be constructive | Offer solutions |
| Be humble | You might be wrong |
| Be kind | Remember the human |
GitHub Review Commands
# View PR diff
gh pr diff <number>
# Checkout PR locally
gh pr checkout <number>
# Add review
gh pr review <number> --approve
gh pr review <number> --request-changes --body "Please fix X"
gh pr review <number> --comment --body "Looks good overall"
# View PR checks
gh pr checks <number>
Common Review Oversights
| Often Missed | How to Catch |
|---|---|
| Error handling | Search for try, catch, throw |
| Null checks | Look for ?., ??, null guards |
| Resource cleanup | Check for open connections, streams |
| Logging | Ensure no sensitive data logged |
| Edge cases | Test with empty, null, max values |
Resources
- Review Checklist - Quick reference checklist for code reviews
Related Skills
- Git Commit - Writing commit messages
- Git PR - Creating Pull Requests
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.