From git-workflow
Reviews code changes between git commits or branches for security vulnerabilities, logic bugs, performance issues, and style inconsistencies.
npx claudepluginhub jpoutrin/product-forge --plugin git-workflowThis skill uses the workspace's default tool permissions.
**Category**: Development
Reviews code changes on the current branch against main using git log and diff. Delivers structured analysis of quality, bugs, tests, security, performance, and improvements with file/line references.
Reviews recent git diffs and commits with brutal honesty before PRs, spotting 2am logic flaws, copy-paste artifacts, debug leftovers, hacks, and poor naming.
Reviews only changes since last commit using impact analysis and blast-radius detection for token-efficient delta code review.
Share bugs, ideas, or general feedback.
Category: Development
/code-review [<commit>] [--from <commit>] [--to <commit>]
| Argument | Default | Description |
|---|---|---|
<commit> | - | Single commit to review |
--from | merge-base with main | Starting commit reference |
--to | HEAD | Ending commit reference |
# Review all changes in current branch (from merge-base to HEAD)
/code-review
# Review a specific commit
/code-review abc1234
# Review a range of commits
/code-review --from abc1234 --to def5678
# Review changes since a specific commit
/code-review --from HEAD~5
# Review changes up to a specific commit
/code-review --to feature-branch
This command delegates to the code-review-expert agent (Haiku model) for fast, cost-effective execution.
Delegation: Use the Task tool with:
subagent_type: "git-workflow:code-review-expert"model: "haiku"prompt: Include the commit range and current working directoryExample:
Task(subagent_type="git-workflow:code-review-expert", model="haiku", prompt="Review changes from abc1234 to HEAD in /path/to/repo")
When this command is run, Claude Code should:
SINGLE_COMMIT = first positional argument (if provided)
FROM = --from value or merge-base with main/master
TO = --to value or HEAD
If a single commit is provided:
FROM = <commit>^, TO = <commit>If no arguments:
# Verify commits exist
git rev-parse --verify "$FROM" 2>/dev/null
git rev-parse --verify "$TO" 2>/dev/null
If invalid, show error with suggestions.
# Get overview
git diff --stat $FROM..$TO
# Get commit history
git log --oneline $FROM..$TO
# Get full diff for analysis
git diff $FROM..$TO
Review each file's changes for:
Critical Issues (must fix)
High Priority (should fix)
Medium Priority (consider fixing)
Low Priority (optional)
Test Coverage
Format output as:
Code Review: <from>..<to>
=========================
Files Changed: N (+X, -Y)
Commits: M
## Critical Issues
- [SECURITY] path/file.py:42 - SQL injection via unsanitized input
## High Priority
- [LOGIC] path/file.py:78 - Missing null check on user.profile
## Medium Priority
- [PERFORMANCE] path/file.py:120 - Queries in loop, consider batch fetch
## Low Priority
- [STYLE] path/file.py:15 - Inconsistent naming: userID vs user_id
## Test Coverage
- Missing tests for: new_feature() in path/file.py
## Suggestions
- Consider adding retry logic for external API calls
---
Overall: NEEDS_CHANGES | APPROVED_WITH_COMMENTS | APPROVED
| Category | Look For |
|---|---|
| Security | Injection, auth, secrets, data exposure |
| Logic | Bugs, error handling, edge cases |
| Performance | N+1 queries, inefficient algorithms |
| Style | Naming, consistency, complexity |
| Tests | Coverage, quality, edge cases |
No changes to review
The commits $FROM and $TO are identical.
Invalid commit reference
Could not find commit: abc1234
Try: git log --oneline -20
Not a git repository
Navigate to a git repository first.
| Command | Purpose |
|---|---|
/commit | Create commits with conventional format |
/rebase | Rebase local changes on remote |