Run CodeRabbit AI code review for external perspective analysis
Runs CodeRabbit AI for external code review and second opinion analysis.
/plugin marketplace add thkt/claude-config/plugin install complete-workflow-system@thkt-development-workflows[--base <branch>] [--type <all|committed|uncommitted>]inheritRun CodeRabbit CLI for external AI code review. Provides a second opinion from an independent AI system with different analysis patterns.
For enhanced reviews, authenticate first:
coderabbit auth login
Benefits of authentication:
Check auth status in Error Handling section if issues occur.
Use /rabbit | Use other command |
|---|---|
| Quick external review | Comprehensive review → /audit |
| Before commit/PR | Architecture review → /audit |
| Second opinion needed | Internal patterns check → /audit |
| Specific branch diff | Project rule compliance → /audit |
| Aspect | /rabbit | /audit |
|---|---|---|
| Source | External AI (CodeRabbit) | Internal agents |
| Speed | Fast (10-30s) | Slower (multi-agent) |
| Focus | General code quality | Project-specific rules |
| Best for | Quick sanity check | Comprehensive review |
Review time varies by scope:
| Scope | Time | Recommendation |
|---|---|---|
| Small (< 10 files) | 10-30 seconds | Run inline |
| Medium (10-50 files) | 1-5 minutes | Run inline or background |
| Large (50+ files) | 7-30+ minutes | Run in background |
For large reviews, tell your AI agent to run CodeRabbit in the background and check back later.
When using /rabbit with AI agents (Claude Code, Cursor, etc.):
run_in_background: true for 50+ file changesRecommended workflow:
/rabbit → /fix (critical only) → /rabbit (verify) → /commit
NOT:
/rabbit → /fix → /rabbit → /fix → /rabbit → ... (infinite loop)
/rabbit
/rabbit --base main
/rabbit --type uncommitted
/rabbit --config CLAUDE.md
CRITICAL: CodeRabbit CLI requires TTY/Raw mode for its terminal UI (Ink framework).
When executing coderabbit review, you MUST use dangerouslyDisableSandbox: true in the Bash tool call:
Bash({
command: "coderabbit review --prompt-only",
dangerouslyDisableSandbox: true // Required for TTY support
})
Why: The sandbox environment provides non-TTY stdin, causing:
!`git status --short | head -10`
Execute CodeRabbit with appropriate options:
# Default: review all changes
coderabbit review --prompt-only
# With base branch (if specified)
coderabbit review --prompt-only --base <branch>
# With type filter (if specified)
coderabbit review --prompt-only --type <type>
Format the output for readability:
## 🐰 CodeRabbit Review Results
### Issues Found
| File | Line | Type | Description |
|------|------|------|-------------|
| ... | ... | ... | ... |
### Summary
- Total issues: X
- By type: refactor (N), potential_issue (N), ...
### Recommended Actions
1. [Priority issues to address]
2. [Optional improvements]
---
📋 Next steps:
- Apply fixes: `/fix` with specific issues
- Full review: `/audit` for comprehensive analysis
- Commit: `/commit` if issues are acceptable
Minimal (no issues):
✅ CodeRabbit: No issues found
With issues:
🐰 CodeRabbit found N issues:
📁 path/to/file.ts
L42 [refactor] Description of suggestion
L78 [issue] Description of potential problem
📁 another/file.ts
L15 [refactor] Another suggestion
💡 Run `/fix` to address these issues
| Error | Action |
|---|---|
| Not a git repo | Display error, suggest git init |
| No changes to review | Display "Nothing to review" |
| Auth required | Suggest coderabbit auth login |
| Network error | Retry once, then display error |
Development Flow:
/code → /rabbit → /fix (if needed) → /commit
PR Flow:
/rabbit --base main → /audit → /pr