Run CodeRabbit CLI analysis on uncommitted changes
Run CodeRabbit CLI to detect race conditions, memory leaks, security vulnerabilities, and logic errors in uncommitted code. Use before committing to catch critical issues that automated testing might miss.
/plugin marketplace add webdevtodayjason/titanium-plugins/plugin install titanium-toolkit@titanium-pluginsYou are running CodeRabbit CLI analysis to catch race conditions, memory leaks, security vulnerabilities, and logic errors in uncommitted code changes.
CodeRabbit CLI provides AI-powered static analysis that detects:
This complements the 3-agent review by finding issues that require deep static analysis.
CodeRabbit CLI must be installed:
Check installation:
command -v coderabbit >/dev/null 2>&1 || echo "Not installed"
If not installed:
❌ CodeRabbit CLI not found
CodeRabbit CLI is optional but provides enhanced code analysis.
To install:
curl -fsSL https://cli.coderabbit.ai/install.sh | sh
source ~/.zshrc # or your shell rc file
Then authenticate:
coderabbit auth login
See: https://docs.coderabbit.ai/cli/overview
Skip CodeRabbit and continue? (yes/no)
If skip: Exit If install: Wait for user to install, then continue
coderabbit auth status
If not authenticated:
⚠️ CodeRabbit not authenticated
For enhanced reviews (with team learnings):
coderabbit auth login
Continue without authentication? (yes/no)
Authentication is optional but provides better reviews (Pro feature).
Ask user:
CodeRabbit Review Mode:
1. **AI-Optimized** (--prompt-only)
- Token-efficient output
- Optimized for Claude to parse
- Quick fix application
- Recommended for workflows
2. **Detailed** (--plain)
- Human-readable detailed output
- Comprehensive explanations
- Good for learning
- More verbose
Which mode? (1 or 2)
Store choice.
Default: Uncommitted changes only
Options:
What should CodeRabbit review?
1. Uncommitted changes only (default)
2. All changes vs main branch
3. All changes vs specific branch
Scope:
Map to flags:
--type uncommitted--base main--base [branch name]For AI-Optimized mode:
# Run in background (can take 7-30 minutes)
coderabbit --prompt-only --type uncommitted
For Detailed mode:
coderabbit --plain --type uncommitted
Use Bash tool with run_in_background: true
Show user:
🤖 CodeRabbit Analysis Running...
This will take 7-30 minutes depending on code size.
Running in background - you can continue working.
I'll check progress periodically.
Check periodically with BashOutput tool:
# Check if CodeRabbit completed
# Look for completion markers in output
Every 2-3 minutes, show:
CodeRabbit analyzing... ([X] minutes elapsed)
When complete:
✅ CodeRabbit analysis complete!
If --prompt-only mode:
If --plain mode:
🤖 CodeRabbit Analysis Complete
⏱️ Duration: [X] minutes
📊 Findings:
- 🔴 Critical: [X] issues
- 🟠 High: [Y] issues
- 🟡 Medium: [Z] issues
- 🟢 Low: [W] issues
Critical Issues:
1. Race condition in auth.ts:45
Issue: Shared state access without lock
Fix: Add mutex or use atomic operations
2. Memory leak in websocket.ts:123
Issue: Event listener not removed on disconnect
Fix: Add cleanup in disconnect handler
[List all critical and high issues]
Would you like me to fix these issues?
1. Fix critical and high priority (recommended)
2. Fix critical only
3. Show me the issues, I'll fix manually
4. Skip (not recommended)
For each critical/high issue:
Show progress:
Fixing issues...
✅ Fixed race condition in auth.ts
✅ Fixed memory leak in websocket.ts
✅ Fixed SQL injection in users.ts
⏳ Fixing error handling in api.ts...
After fixes:
Fixes applied: [X] critical, [Y] high
Re-run CodeRabbit to verify fixes? (yes/no)
If yes:
coderabbit --prompt-only --type uncommitted
Check no new critical issues introduced.
mcp__Pieces__create_pieces_memory(
summary_description: "CodeRabbit review findings for [files]",
summary: "CodeRabbit CLI analysis complete. Findings: [X] critical, [Y] high, [Z] medium, [W] low. Critical issues: [list]. High issues: [list]. Fixes applied: [what was fixed]. Duration: [X] minutes. Verified: [yes/no].",
files: [
"list all reviewed files",
".titanium/coderabbit-report.md" (if created)
],
project: "$(pwd)"
)
✅ CodeRabbit Review Complete!
📊 Summary:
- Duration: [X] minutes
- Files reviewed: [N]
- Issues found: [Total]
- Critical: [X] ([fixed/pending])
- High: [Y] ([fixed/pending])
- Medium: [Z]
- Low: [W]
✅ Critical issues: All fixed
✅ High priority: All fixed
⚠️ Medium/Low: Review manually if needed
💾 Findings stored in Pieces
---
Next steps:
1. Run tests to verify fixes
2. Run /titanium:review for additional validation
3. Or continue with your workflow
⚠️ CodeRabbit CLI not found
CodeRabbit is optional but provides enhanced static analysis.
Would you like to:
1. Install now (I'll guide you)
2. Skip and use 3-agent review only
3. Cancel
Choose:
⏰ CodeRabbit taking longer than expected
Analysis started [X] minutes ago.
Typical duration: 7-30 minutes.
Options:
1. Keep waiting
2. Cancel and proceed without CodeRabbit
3. Check CodeRabbit output so far
What would you like to do?
ℹ️ No uncommitted changes found
CodeRabbit needs changes to review.
Options:
1. Review all changes vs main branch
2. Specify different base branch
3. Cancel
Choose:
/coderabbit:review
# Runs analysis
# Applies fixes
# Done
/titanium:work
# ... implementation ...
# Phase 3.5: CodeRabbit (if installed)
# ... 3-agent review ...
# Complete
# Before commit
/coderabbit:review
# Fix critical issues
# Then commit
Voice hooks announce:
CodeRabbit pricing:
Not included in titanium-toolkit pricing - separate service.
This command provides deep static analysis to catch issues agents might miss!