Commit with Code Review
Runs CodeRabbit review on staged changes, then commits if approved.
Flow
- •Check for staged changes
- •Run CodeRabbit review (
cr review --plainfor headless/Claude compatibility) - •Show review results
- •If review passes → prompt for commit message → commit
- •If review fails → show issues → ask user if they want to proceed anyway
Usage
bash
# Stage your changes first git add <files> # Then invoke the skill /commit
What This Skill Does
When invoked, Claude will:
- •Check staged changes: Run
git diff --staged --statto show what's staged - •Run CodeRabbit: Execute
cr review --plain(headless mode, works from Claude) - •Evaluate results:
- •If CR passes (no critical issues): proceed to commit
- •If CR fails: show issues and ask user for decision
- •Commit: Generate commit message based on changes, commit with co-author
Manual Steps (if not using this skill)
bash
# 1. Stage changes git add -A # 2. Run CodeRabbit (--plain for headless) cr review --plain # 3. If passes, commit git commit -m "feat: description Co-Authored-By: Claude <noreply@anthropic.com>"
Requirements
- •
crCLI installed (CodeRabbit) - •Changes staged with
git add
Notes
- •This is for interactive use, not Ralph execution
- •For Ralph stories, use
/ralph-commitinstead - •Does NOT push - that's a separate action