AgentSkillsCN

coderabbit

当您需要审查未提交的更改、准备Pull Request、排查安全问题,或验证代码质量时,这一工具便能派上用场。它通过CLI运行AI代码审查,涵盖代码审查、PR审查、安全扫描以及机密信息扫描。注意:此工具不适用于运行时调试(请改用调试器),也不适用于直接运行测试(请直接执行测试)。

SKILL.md
--- frontmatter
name: coderabbit
description: Use when reviewing uncommitted changes, preparing PRs, checking for security issues, or verifying code quality. Runs AI code reviews via CLI. Covers code review, PR review, security scan, secrets scan. NOT for: runtime debugging (use debugger), test execution (run tests directly).
execute: scripts/review.sh

CodeRabbit - AI Code Review

Fast AI code reviews via CodeRabbit CLI. Free for open source.

Allowed Repositories

This skill is only available for:

  • claude-golem (ralphtools)
  • songscript

Before using, verify you're in an allowed repo:

bash
basename $(git rev-parse --show-toplevel 2>/dev/null)
# Must be: claude-golem, ralphtools, or songscript

Quick Commands

bash
cr review --plain           # Human-readable review
cr review --prompt-only     # For AI agents (minimal tokens)
cr review --type uncommitted # Only unstaged changes
cr review --base main       # Compare against main branch

Workflows

WorkflowUse Case
reviewStandard code review
verifyQuick verification for Ralph V-* stories
securitySecurity-focused review
accessibilityA11y audit for UI changes
secretsScan for hardcoded secrets/keys
pr-readyPre-PR comprehensive check

Output Modes

FlagBest ForToken Usage
--plainHumans reading in terminalHigh
--prompt-onlyAI agents (Ralph, Claude)Low
(default)Interactive TUIN/A

Integration with Ralph

For V-* verification stories, CodeRabbit runs FIRST as a fast pre-check:

  1. cr review --prompt-only --type committed - Quick scan
  2. If issues found → Fix before Claude verification
  3. If clean → Proceed to full Claude verification

This reduces Claude API costs and catches obvious issues fast.

Configuration

Optional .coderabbit.yaml in repo root for custom rules:

yaml
reviews:
  language: en
  path_filters:
    - "!**/*.test.ts"
    - "!**/node_modules/**"

Requirements

  • CodeRabbit CLI installed: curl -fsSL https://cli.coderabbit.ai/install.sh | sh
  • Authenticated: cr auth login
  • Must run from git repository root