| name | coderabbit | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| displayName | CodeRabbit — AI code review | |||||||||||
| description | Run CodeRabbit AI code reviews against local changes without leaving Kiro. Catches bugs, security issues, and style violations before you push or open a PR. | |||||||||||
| keywords |
|
|||||||||||
| author | CodeRabbit |
CodeRabbit is an AI code review platform trusted by production teams on GitHub, GitLab, Azure DevOps, and Bitbucket. This power lets Kiro drive the local coderabbit CLI to review your working tree, uncommitted changes, or a branch diff — returning structured findings the agent can act on immediately.
This power is CLI-native: it wraps the coderabbit review --agent command, which emits a well-defined newline-delimited JSON stream designed specifically for agent consumption. No MCP server is required, and no GitHub Personal Access Token is needed — authentication is handled by the CLI's own OAuth flow.
Key capabilities:
- Uncommitted-change review: Review what you've edited before you commit.
- Committed-only review: Review just what's new vs. the base branch.
- Full-diff review: Review everything that differs from
main(or any base). - File-scoped review: Focus the review on specific files.
- Agent-friendly output: Structured NDJSON stream with per-finding events, severity levels, and codegen-ready fix instructions.
- Install the CodeRabbit CLI (macOS/Linux):
curl -fsSL https://cli.coderabbit.ai/install.sh | sh - Authenticate (opens a browser once):
coderabbit auth login
- Confirm you're signed in:
coderabbit auth status
If coderabbit auth status reports an authenticated user, this power is ready to use. Otherwise, Kiro should stop and ask the human to run coderabbit auth login — the agent cannot complete the OAuth flow on the user's behalf.
The CLI is the single integration point. Always run from the root of a git repository.
coderabbit review --agent --base main--agentswitches stdout to newline-delimited JSON events.--base <branch>names the branch to diff against (defaults to the repository's default base).- Add
-t uncommittedto scope to unstaged/staged-but-uncommitted changes only. - Add
-t committedto scope to new commits on the current branch. - Add
-t all(default) to review everything that differs from the base. - Add
-f <file> [<file> ...]to scope to specific files.
Every line of stdout is a JSON object. The full schema is documented in steering/agent-event-schema.md. The five event type values are:
type |
When it appears | What the agent does |
|---|---|---|
review_context |
First, once | Confirm repo, base, and review type. |
status |
Repeated | Update user on progress (connecting → setup → analyzing). |
finding |
Zero or more | The actionable unit. Contains severity, fileName, codegenInstructions, suggestions. |
error |
On failure | Distinguish auth/rate_limit/network errors; recover or escalate. |
complete |
Last, once | Terminal success; carries findings: N. |
See steering/review-workflow.md for the full recipe, including how to turn a finding into a concrete code edit.
coderabbit review --agent --base main -t committedTriggered when the user says something like "review my changes before I push" or "what would CodeRabbit say about this PR?". Treat every finding with severity at or above major as blocking; present minor and suggestion findings as optional improvements.
coderabbit review --agent -t uncommittedTriggered when the user says "is my WIP clean?" or "check what I've changed". Especially useful right before git commit.
coderabbit review --agent -f src/auth.ts src/session.tsTriggered when the user names specific files. Faster than full-diff reviews and produces focused output.
When a finding includes non-empty codegenInstructions, that text is a self-contained prompt describing the fix. The agent should:
- Read the file at
fileName. - Apply the change described in
codegenInstructions, usingsuggestions[]as reference patches when present. - Re-run the review with
-f <fileName>to confirm the finding is resolved.
- Run from the repo root. The CLI uses git to compute diffs and expects to be inside a working tree.
- Parse NDJSON line-by-line. Do not wait for the whole stream; start acting on findings as they arrive.
- Respect
severity. Escalatecriticalandmajor; treatminor/suggestionas optional polish. - Use
codegenInstructionsverbatim. It's already authored for agent consumption. - Fall back gracefully on
errorevents.error.errorType === "auth"means the user must re-runcoderabbit auth login; do not retry silently.
- Don't run
coderabbit reviewwithout--agentwhen the agent is consuming the output. The plain-text mode is for humans. - Don't pipe the output through formatters that break line boundaries.
- Don't invent new flags. The CLI surface is stable; if a flag isn't listed here, check
coderabbit review --help. - Don't prompt the user for a GitHub PAT. This power does not require one; that's a community-MCP-server convention, not a CodeRabbit requirement.
No configuration is required beyond installing the CLI and authenticating. The CLI persists its OAuth token in the user's local config directory; the coderabbit binary is expected to be on PATH.
Optional repository-level configuration lives in .coderabbit.yaml at the repo root. If the user asks to tune review behavior (severity thresholds, path filters, review profile), edit that file. The schema is documented at https://docs.coderabbit.ai/reference/yaml-template.
Cause: CLI not installed or not on PATH.
Fix: Run the installer from the Prerequisites section and reopen your terminal.
Cause: Missing or expired OAuth token.
Fix: Ask the user to run coderabbit auth login. Do not attempt to authenticate programmatically.
Cause: Org has exceeded the free-tier review budget.
Fix: Surface metadata.policyGuidance (CodeRabbit's server-provided hint) to the user. Do not retry on a timer; wait for the user to decide.
Cause: The review service is still warming up, or the repository is large.
Fix: Keep reading; treat a 2+ minute silence as suspicious and suggest rerunning with -f <file> to narrow the scope.
Cause: The wrong review -t was selected, or the base branch isn't where the user expected.
Fix: Inspect the first review_context event — it echoes back reviewType, currentBranch, baseBranch. If they're wrong, rerun with explicit flags.
License: Apache-2.0