coderabbit-local-dev-loop
Automates local AI-powered code reviews using the CodeRabbit CLI to catch issues before committing.
Install
mkdir -p .claude/skills/coderabbit-local-dev-loop && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4758" && unzip -o skill.zip -d .claude/skills/coderabbit-local-dev-loop && rm skill.zipInstalls to .claude/skills/coderabbit-local-dev-loop
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Configure CodeRabbit CLI for local pre-commit code reviews and fastKey capabilities
- →Perform local AI code reviews
- →Integrate reviews into git hooks
- →Review specific files or staged changes
- →Provide interactive feedback via terminal
- →Configure review path instructions
How it works
The CLI runs AI-powered reviews against local git changes, allowing developers to receive feedback before pushing code. It supports integration into git hooks and VS Code tasks for automated workflows.
Inputs & outputs
When to use coderabbit-local-dev-loop
- →Perform pre-commit reviews on local changes
- →Test CodeRabbit configuration changes
- →Review specific files before pushing
- →Streamline git commit workflows with AI checks
About this skill
CodeRabbit Local Dev Loop
Overview
Use CodeRabbit CLI to review code locally before opening a PR. The CLI provides the same AI-powered review as the GitHub App but runs in your terminal against staged or unstaged changes. This creates a multi-layered review process: local CLI review before commit, then automated PR review after push.
Prerequisites
- CodeRabbit CLI installed (
curl -fsSL https://cli.coderabbit.ai/install.sh | sh) - Git repository with
.coderabbit.yamlconfiguration - CodeRabbit account (CLI uses credits: $0.25 per file reviewed)
Instructions
Step 1: Install and Verify CLI
set -euo pipefail
# Install CodeRabbit CLI
curl -fsSL https://cli.coderabbit.ai/install.sh | sh
# Verify installation
cr --version
# Authenticate (opens browser for OAuth)
cr auth login
Step 2: Local Review Workflow
set -euo pipefail
# Review all staged changes (most common workflow)
git add -A
cr review
# Review specific files only
cr review src/api/routes.ts src/middleware/auth.ts
# Interactive mode: ask follow-up questions about review feedback
cr review --interactive
# Plain output mode (pipe to other tools or AI agents)
cr review --prompt-only
Step 3: Git Hook Integration
#!/bin/bash
# .git/hooks/pre-push (make executable: chmod +x .git/hooks/pre-push)
set -euo pipefail
echo "Running CodeRabbit pre-push review..."
# Get list of changed files vs remote
CHANGED_FILES=$(git diff --name-only @{push}.. 2>/dev/null || git diff --name-only HEAD~1)
if [ -n "$CHANGED_FILES" ]; then
echo "$CHANGED_FILES" | xargs cr review
# Non-blocking: show review but don't prevent push
# To make blocking, check exit code:
# echo "$CHANGED_FILES" | xargs cr review || {
# echo "CodeRabbit found issues. Push anyway? (y/n)"
# read -r response
# [ "$response" != "y" ] && exit 1
# }
fi
Step 4: Configuration for Local Development
# .coderabbit.yaml - Settings that affect both CLI and PR reviews
language: "en-US"
reviews:
profile: "assertive"
path_instructions:
- path: "src/**"
instructions: "Check for proper error handling and type safety."
- path: "tests/**"
instructions: "Verify edge cases and assertion completeness."
path_filters:
- "!**/*.lock"
- "!dist/**"
- "!**/*.generated.*"
auto_review:
enabled: true
drafts: false
chat:
auto_reply: true
Step 5: IDE Integration Pattern
// .vscode/tasks.json - Run CodeRabbit review from VS Code
{
"version": "2.0.0",
"tasks": [
{
"label": "CodeRabbit: Review Current File",
"type": "shell",
"command": "cr review ${file}",
"presentation": { "reveal": "always", "panel": "shared" },
"problemMatcher": []
},
{
"label": "CodeRabbit: Review Staged Changes",
"type": "shell",
"command": "cr review",
"presentation": { "reveal": "always", "panel": "shared" },
"problemMatcher": []
}
]
}
Two-Layer Review Strategy
Developer writes code
│
▼
┌──────────────────┐
│ cr review (local) │ ← Layer 1: Fast feedback before commit
│ Fix obvious issues│
└────────┬─────────┘
│
▼
git commit + push
│
▼
┌──────────────────┐
│ CodeRabbit App │ ← Layer 2: Full context review on PR
│ (automated PR │
│ review) │
└──────────────────┘
Output
- CodeRabbit CLI installed and authenticated
- Pre-push git hook for automated local reviews
- VS Code task integration for on-demand reviews
- Two-layer review workflow (local + PR)
Error Handling
| Issue | Cause | Solution |
|---|---|---|
cr: command not found | CLI not in PATH | Re-run install script or add to PATH |
| Auth token expired | Session timeout | Run cr auth login again |
| "No credits remaining" | Usage-based billing exhausted | Purchase credits at app.coderabbit.ai |
| Review hangs on large file | File too large for AI context | Review specific files instead of all |
| Empty review output | No changed files detected | Stage changes with git add first |
Resources
Next Steps
See coderabbit-sdk-patterns for PR interaction automation patterns.
When not to use it
- →Reviewing files without git staging
- →Replacing full PR-based automated reviews
Prerequisites
Limitations
- →Requires internet access for AI review processing
- →Usage-based billing applies per file reviewed
How it compares
This approach provides immediate AI feedback locally before a commit, whereas standard PR reviews only occur after code is pushed to the remote repository.
Compared to similar skills
coderabbit-local-dev-loop side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| coderabbit-local-dev-loop (this skill) | 1 | 27d | Review | Intermediate |
| subagent-driven-development | 14 | 7mo | No flags | Advanced |
| swarm-coordination | 0 | 6mo | No flags | Advanced |
| resolve-conflicts | 81 | 8mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by jeremylongshore
View all by jeremylongshore →You might also like
subagent-driven-development
davila7
Use when executing implementation plans with independent tasks in the current session
swarm-coordination
joelhooks
Multi-agent coordination patterns for OpenCode swarm workflows. Use when work benefits from parallelization or coordination.
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
claude-automation-recommender
anthropics
Analyze a codebase and recommend Claude Code automations (hooks, subagents, skills, plugins, MCP servers). Use when user asks for automation recommendations, wants to optimize their Claude Code setup, mentions improving Claude Code workflows, asks how to first set up Claude Code for a project, or wants to know what Claude Code features they should use.
codex-skill
feiskyer
Use when user asks to leverage codex, gpt-5, or gpt-5.1 to implement something (usually implement a plan or feature designed by Claude). Provides non-interactive automation mode for hands-off task execution without approval prompts.
agent-factory
alirezarezvani
Claude Code agent generation system that creates custom agents and sub-agents with enhanced YAML frontmatter, tool access patterns, and MCP integration support following proven production patterns