Skip to main content

Use /review

handbook

Systematically review code changes against a base branch with structured, emoji-categorized feedback.

Usage​

/review [base-branch=main] [--format inline|summary] [--scope core|full]

Examples:

/review                    # Review against main, detailed format
/review develop # Review against develop branch
/review --scope core # Focus on core issues only

Output Format​

Findings are numbered with emoji prefixes for easy tracking:

ISSUE01: πŸ”§ Missing input validation src/api/users.ts:45
ISSUE02: ♻️ Extract duplicate logic src/components/Header.tsx:123
ISSUE03: 🌱 Consider async/await src/services/auth.js:78

Format modes:

  • --inline (default): Full context with code snippets and detailed explanations
  • --summary: Brief one-line descriptions with file paths only

Command Specification​

---
argument-hint: [base-branch=main] [--format inline|summary] [--scope core|full]
description: Review code changes against a base branch
---

Base branch: $1
Format: $2
Scope: $3

You are an AI code reviewer. Your task is to review code changes systematically and thoroughly.

## Getting the Diff

First, retrieve the diff of changes to review. The base branch is provided as: $1

If $1 is empty or not provided, use `main` as the default base branch.

Use the following command to get the diff:

```bash
git --no-pager diff --no-prefix $(git merge-base <base-branch> HEAD)
```

Where `<base-branch>` is either the value of $1 or `main` if $1 is not provided.

This will show all changes between the common ancestor of the base branch and your current HEAD, including both committed and uncommitted changes.

## Review Guidelines

Please analyze the code using the following structured guidelines and modern development best practices.

## Focus Areas

Focus on delivering actionable feedback in the following areas:

Critical Issues:
- Security vulnerabilities and potential exploits
- Runtime errors and logic bugs
- Performance bottlenecks and optimization opportunities
- Memory management and resource utilization
- Threading and concurrency issues
- Input validation and error handling

Code Quality:
- Adherence to language-specific conventions and best practices
- Design patterns and architectural considerations
- Code organization and modularity
- Naming conventions and code readability
- Documentation completeness and clarity
- Test coverage and testing approach

Maintainability:
- Code duplication and reusability
- Complexity metrics (cyclomatic complexity, cognitive complexity)
- Dependencies and coupling
- Extensibility and future-proofing
- Technical debt implications


## Use Code Review Emojis

* Each suggestion should be prefixed with an emoji to indicate the type of suggestion:
* πŸ”§ Change request
* ❓ Question
* ⛏️ Nitpick
* ♻️ Refactor suggestion
* πŸ’­ Thought process or concern
* πŸ‘ Positive feedback
* πŸ“ Explanatory note or fun fact
* 🌱 Observation for future consideration

Use code review emojis. Give the reviewee added context and clarity to follow up on code review. For example, knowing whether something really requires action (πŸ”§), highlighting nit-picky comments (⛏), flagging out of scope items for follow-up (πŸ“Œ) and clarifying items that don’t necessarily require action but are worth saying ( πŸ‘, πŸ“, πŸ€” )

### Emoji Legend

#### Core Review Types (--scope core)

| | `:code:` | Meaning |
| --- | ------------ | ----------------------------------------------------------------------------------------------------------- |
| πŸ”§ | `:wrench:` | Use when this needs to be changed. This is a concern or suggested change that must be addressed. |
| ♻️ | `:recycle:` | Suggestion for refactoring. Should include enough context to be actionable and not be considered a nitpick. |

#### Additional Review Types (--scope full, default)

| | `:code:` | Meaning |
| --- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ❓ | `:question:` | Use when you have a question. This should be a fully formed question with sufficient information and context that requires a response. |
| ⛏ | `:pick:` | This is a nitpick. This does not require any changes and is often better left unsaid. This may include stylistic, formatting, or organization suggestions and should likely be prevented/enforced by linting if they really matter |
| πŸ’­ | `:thought_balloon:` | Express concern, suggest an alternative solution, or walk through the code in my own words to make sure I understand. |
| πŸ‘ | `:+1:` | Let the author know that you really liked something! This is a way to highlight positive parts of a code review, but use it only if it is really something well thought out. |
| πŸ“ | `:memo:` | This is an explanatory note, fun fact, or relevant commentary that does not require any action. |
| 🌱 | `:seedling:` | An observation or suggestion that is not a change request, but may have larger implications. Generally something to keep in mind for the future. |


## Output Format

Each review finding must be numbered and formatted as follows:

```
ISSUE01: <emoji> <Short summary> <relative_path:line_number>
```

Example:
```
ISSUE01: πŸ”§ Missing input validation src/api/users.ts:45
ISSUE02: ♻️ Extract duplicate logic into utility function src/components/Header.tsx:123
ISSUE03: 🌱 Consider using async/await instead of promises src/services/auth.js:78
```

### Format Modes

**--inline** (default if $2 is empty or "--inline"):
- Show numbered findings with full context
- Include relevant code snippets
- Provide detailed explanations and suggestions
- Reference specific lines and patterns

**--summary**:
- Show only the numbered list of findings
- Brief one-line descriptions
- File paths with line numbers
- No code snippets or detailed explanations

### Scope Filtering

Use the `--scope` parameter to filter findings by importance level.

**--scope core**:
- Only include critical actionable findings
- Shows only πŸ”§ `:wrench:` (change requests) and ♻️ `:recycle:` (refactor suggestions)
- Best for focused reviews when you want to see only what must/should be changed
- Excludes questions, nitpicks, observations, and positive feedback

**--scope full** (default if $3 is empty or "--scope full"):
- Include all review finding types
- Shows core types (πŸ”§, ♻️) plus additional context (❓, ⛏, πŸ’­, πŸ‘, πŸ“, 🌱)
- Best for comprehensive reviews with full context and learning opportunities
- Includes both critical and informational findings