4.8 KiB
description
| description |
|---|
| Download CodeRabbit AI review comments for a Pull Request |
Download PR Reviews
This command downloads CodeRabbit AI review comments from a GitHub Pull Request and organizes them by severity for systematic resolution.
This command works from any directory - it will save reviews to the current working directory's .reviews/ folder.
Usage
# With PR number
/reviewer:download-issues --pr 123
# Without PR number (auto-detects latest open PR)
/reviewer:download-issues
How Claude Code Executes This
When you run /reviewer:download-issues --pr 123 or /reviewer:download-issues, Claude Code will:
- Find the installed
pr-reviewerskill location - Execute the download script from the skill directory
- Save output to your current working directory (the repo you're working on)
Command
# Execute from skill location, save to current working directory
CWD=$(pwd) node ~/.claude/plugins/marketplaces/claude-craftkit/plugins/reviewer/skills/pull-request-skill/run.js download <pr>
# Or without PR number (auto-detect latest)
CWD=$(pwd) node ~/.claude/plugins/marketplaces/claude-craftkit/plugins/reviewer/skills/pull-request-skill/run.js download
Note: The exact path may vary depending on where Claude Code installs plugins. Claude will handle finding the correct path automatically.
Prerequisites
-
GitHub Personal Access Token
The skill needs a
.envfile in its installation directory with your GitHub token:# Location: ~/.claude/plugins/marketplaces/claude-craftkit/plugins/reviewer/skills/pull-request-skill/.env GITHUB_TOKEN=ghp_your_personal_access_token_here OUTPUT_DIR=./.reviews LOG_LEVEL=info PR_REVIEW_TZ=America/Sao_PauloGenerate token at: https://github.com/settings/tokens Required scopes:
repo(full repository access) -
Dependencies
Dependencies will be auto-installed on first run. To install manually:
cd ~/.claude/plugins/marketplaces/claude-craftkit/plugins/reviewer/skills/pull-request-skill bun install
Output Structure
The command creates a directory structure in your repo's .reviews/reviews-pr-<pr>/:
your-repo/
└── .reviews/ # Created in YOUR working directory
└── reviews-pr-123/
├── summary.md # 📊 Overview with statistics
├── pr-review-combined.log # 📋 Full execution logs
├── pr-review-error.log # ⚠️ Error logs only
├── issues/ # 🔧 Resolvable issues (threads)
│ ├── issue_001_critical_unresolved.md
│ ├── issue_002_major_unresolved.md
│ └── issue_003_trivial_resolved.md
└── comments/ # 💬 General comments
├── comment_001.md
└── comment_002.md
Issue Severity Levels
Issues are automatically categorized by severity:
- 🔴 Critical: Serious problems requiring immediate attention
- 🟠 Major: Important issues affecting functionality
- 🔵 Trivial: Minor issues and style improvements
Next Steps
After downloading reviews:
- Review the summary: Check
.reviews/reviews-pr-<pr>/summary.md - Start fixing issues: Use the
/fixcommand - Track progress: Issues are marked as resolved/unresolved
Environment Variables
GITHUB_TOKEN(required): GitHub Personal Access TokenOUTPUT_DIR(optional): Output directory relative to working dir (default:./.reviews)CWD(optional): Override working directory (default: current directory)LOG_LEVEL(optional): Logging level -error,warn,info,debug(default:info)PR_REVIEW_TZ(optional): Timezone for dates (default: system timezone)
Examples
# Download PR #123 - saves to current directory's .reviews/
/reviewer:download-issues --pr 123
# Download latest open PR (auto-detects)
/reviewer:download-issues
# With debug logging
LOG_LEVEL=debug /reviewer:download-issues --pr 123
# Save to custom directory
OUTPUT_DIR=./my-reviews /reviewer:download-issues --pr 123
Troubleshooting
"GITHUB_TOKEN is not set"
- Create
.envfile in the skill's installation directory - Path:
~/.claude/plugins/marketplaces/claude-craftkit/plugins/reviewer/skills/pull-request-skill/.env
"No CodeRabbit AI comments found"
- CodeRabbit hasn't reviewed the PR yet
- Check if PR has comments from
@coderabbitai[bot]
"Repository information could not be parsed"
- Verify you're in a git repository
- Check git remote:
git remote -v - Remote must be:
https://github.com/owner/repo.git
See Also
/reviewer:fix-issues- Fix issues from a downloaded PR review/reviewer:pr-status- Check status of PR reviews