code-rabbit

A command that reviews CodeRabbit’s automated code-review comments against the surrounding code and project design.

In plain words
What is it for?
Use it to assess and apply CodeRabbit suggestions in one or more files, while reporting which comments were accepted or ignored.
Why use it?
Automated review tools may miss context and suggest changes that do not fit the project. This command helps separate useful comments from unsuitable ones and explains each decision.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/kamiazya/scopes/code-rabbit
Clone the repo
git clone --depth 1 https://github.com/kamiazya/scopes

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 755 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00755
Opus 5 $0.00000 $0.00378
Sonnet 5 $0.00000 $0.00151
Haiku 4.5 $0.00000 $0.00076

Measured yesterday against content hash f21bfc73b0a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-rabbit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/code-rabbit.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CodeRabbit Review Handler

Process CodeRabbit review comments with context-aware discretion.

Usage

/code-rabbit

Then paste one or more CodeRabbit comments.

Instructions

1. Initial Context

Inform the user:

I'll review the CodeRabbit comments with discretion, as CodeRabbit doesn't have access to the entire codebase and may not understand the full context.

For each comment, I'll:
- Evaluate if it's valid given our codebase context
- Accept suggestions that improve code quality
- Ignore suggestions that don't apply to our architecture
- Explain my reasoning for accept/ignore decisions

2. Process Comments

Single File Comments

If all comments relate to one file:

  • Read the file for context
  • Evaluate each suggestion
  • Apply accepted changes in batch using MultiEdit
  • Report which suggestions were accepted/ignored and why
Multiple File Comments

If comments span multiple files:

Launch parallel sub-agents using Task tool:

Task:
  description: "CodeRabbit fixes for {filename}"
  subagent_type: "general-purpose"
  prompt: |
    Review and apply CodeRabbit suggestions for {filename}.
    
    Comments to evaluate:
    {relevant_comments_for_this_file}
    
    Instructions:
    1. Read the file to understand context
    2. For each suggestion:
       - Evaluate validity given codebase patterns
       - Accept if it improves quality/correctness
       - Ignore if not applicable
    3. Apply accepted changes using Edit/MultiEdit
    4. Return summary:
       - Accepted: {list with reasons}
       - Ignored: {list with reasons}
       - Changes made: {brief description}
    
    Use discretion - CodeRabbit lacks full context.

3. Consolidate Results

After all sub-agents complete:

📋 CodeRabbit Review Summary

Files Processed: {count}

Accepted Suggestions:
  {file}: {changes_made}
  
Ignored Suggestions:
  {file}: {reason_ignored}

Overall: {X}/{Y} suggestions applied

4. Common Patterns to Ignore

  • Style preferences that conflict with project conventions
  • Generic best practices that don't apply to our specific use case
  • Performance optimizations for code that isn't performance-critical
  • Accessibility suggestions for internal tools
  • Security warnings for already-validated patterns
  • Import reorganization that would break our structure

Read the full file on GitHub · 121 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 121 lines · 0 tokens per session scan A f21bfc73b0a5

Subscribe to this mod's changes

code-rabbit is a command published in the GitHub repository kamiazya/scopes (2 stars, last pushed 9mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 755 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.