home / skills / bitsoex / bitso-java / coderabbit-workflow

coderabbit-workflow skill

/.claude/skills/coderabbit-workflow

This skill helps you systematically address CodeRabbit review comments using local CLI, PR thread workflows, and co-author commit attribution.

npx playbooks add skill bitsoex/bitso-java --skill coderabbit-workflow

Review the files below or copy the command above to add this skill to your agents.

Files (10)
SKILL.md
3.4 KB
---
name: coderabbit-workflow
description: Systematic workflow for CodeRabbit reviews - local CLI, PR threads, and commit attribution
compatibility: All repositories with CodeRabbit enabled

metadata:
  version: "2.0.0"
  category: code-quality
  tags:
    - code-review
    - coderabbit
    - quality
  triggers:
    - before-push
    - on-demand
---

# CodeRabbit Workflow

Address CodeRabbit review comments systematically. Workflows for local CLI usage, PR thread processing, and commit attribution.

## When to use this skill

- When addressing CodeRabbit review comments on a PR
- Before push, to get early feedback with local CLI
- When asked to "fix coderabbit issues" or "address coderabbit comments"

## Skill Contents

### Available Resources

**📚 references/** - Detailed documentation
- [cli integration](references/cli-integration.md)
- [commit formats](references/commit-formats.md)
- [setup](references/setup.md)
- [workflow examples](references/workflow-examples.md)

**đź”§ scripts/** - Automation scripts
- [batch reply](scripts/batch-reply.ts)
- [export comments](scripts/export-comments.ts)
- [reply to threads](scripts/reply-to-threads.ts)
- [run local review](scripts/run-local-review.ts)

---

## Two Review Modes

| Mode | When | Reference |
|------|------|-----------|
| **Local CLI** | Before push, get early feedback | `references/cli-integration.md` |
| **PR Threads** | After CodeRabbit reviews your PR | `references/workflow-examples.md` |

## Quick Start

1. Export comments: `node .claude/skills/coderabbit-workflow/scripts/export-comments.ts --pr <number>`
2. Review by severity: critical, major, minor
3. Apply fixes following patterns in `references/workflow-examples.md`
4. Commit with CodeRabbit co-author attribution (see below)
5. Update exported JSON to mark comments as fixed (set `status: 'fixed'`)
6. Push and reply to threads: `node .claude/skills/coderabbit-workflow/scripts/reply-to-threads.ts --file .tmp/coderabbit-*.json`

**Note:** The reply script only processes comments with `status !== 'pending'`. After applying fixes, update the JSON file to change status from `'pending'` to `'fixed'` before running the reply script.

## Scripts

| Script | Purpose |
|--------|---------|
| `scripts/run-local-review.ts` | Run CodeRabbit CLI and save findings |
| `scripts/export-comments.ts` | Export PR comments to local JSON |
| `scripts/reply-to-threads.ts` | Batch reply to threads after fixes |

## References

| Reference | Content |
|-----------|---------|
| `references/setup.md` | Installation, authentication, troubleshooting |
| `references/cli-integration.md` | CLI commands and async workflow |
| `references/commit-formats.md` | All commit message templates |
| `references/workflow-examples.md` | Complete workflow examples |

## Key Requirement: Co-Author

All CodeRabbit fix commits must include:

```text
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
```

See `references/commit-formats.md` for all templates.

## Related

- [pr-workflow](.claude/skills/pr-workflow/SKILL.md) - PR lifecycle including CodeRabbit integration
- [CodeRabbit CLI Docs](https://docs.coderabbit.ai/cli/overview)
- [Cursor Integration](https://docs.coderabbit.ai/cli/cursor-integration)
<!-- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY -->
<!-- Source: bitsoex/ai-code-instructions → global/skills/coderabbit-workflow/SKILL.md -->
<!-- To modify, edit the source file and run the distribution workflow -->

Overview

This skill provides a systematic workflow for addressing CodeRabbit review comments across a local CLI, PR threads, and commit attribution. It bundles scripts, reference docs, and conventions so you can find, fix, commit, and respond to CodeRabbit feedback consistently. Use it to get early local feedback or to close out comments on an open pull request.

How this skill works

The workflow offers two review modes: run a local CLI review before pushing, or export and process PR thread comments after CodeRabbit reviews your PR. Scripts export comments to JSON, run local reviews, and batch-reply to threads once comments are marked fixed. All fix commits must include a required Co-authored-by line for CodeRabbit attribution.

When to use it

  • Before pushing code to get early automated feedback with the local CLI
  • When a PR has CodeRabbit review comments that need systematic addressing
  • When tasked to “fix coderabbit issues” or “address coderabbit comments”
  • To automate batch replies to PR threads after applying fixes
  • When you need consistent commit message templates and co-author attribution

Best practices

  • Run run-local-review.ts locally before opening or updating a PR to catch issues early
  • Export PR comments and sort by severity (critical, major, minor) to prioritize work
  • Update exported JSON status from 'pending' to 'fixed' before running the reply script
  • Include the required Co-authored-by line in every fix commit to maintain attribution
  • Follow commit message templates in the commit-formats reference for traceability

Example use cases

  • Run the CLI to detect issues locally and iterate until the report is clean before pushing
  • Export PR comments, apply fixes, then batch-reply to threads with reply-to-threads.ts to close out discussions
  • Use export-comments.ts to create a checklist that your team can share and mark as fixed
  • Automate replies for multiple PRs by updating their JSON exports and running the batch reply script
  • Enforce co-author attribution automatically by using the commit message templates from the references

FAQ

What must I change in the exported JSON before replying to threads?

Set each comment's status from 'pending' to 'fixed' for items you addressed; the reply script only processes comments where status !== 'pending'.

How do I include CodeRabbit as a co-author on fix commits?

Add the required Co-authored-by line exactly as specified: Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>. Commit templates in the references show examples.