
Skill for Claude Code that provides code review assistance
概览
This is a code review assistant skill and bundled CLI agent. Rather than reviewing the code entirely on its own, it's serving as an intelligent companion to a reviewer, by providing the following: 1. Automatic matching of reviewers on your team based on their expertise 2. First code review pass based on team-specific code patterns and concerns 3. Visual explanation of complex architectural changes (feat. Nano Banana Pro) For a representative example, take a look at this PR comment: https://github.com/pbakaus/code-review-assistant/pull/1#issuecomment-3568698430 Required API keys: - : https://console.anthropic.com/ - : https://github.com/settings/tokens (needs repo scope) - (optional): https://makersuite.google.com/app/apikey - (optional): https://cloudinary.
README
以下为原文 README 节选,完整内容请查看原文。
Code Review Assistant
This is a code review assistant skill and bundled CLI agent. Rather than reviewing the code entirely on its own, it’s serving as an intelligent companion to a reviewer, by providing the following:
- Automatic matching of reviewers on your team based on their expertise
- First code review pass based on team-specific code patterns and concerns
- Visual explanation of complex architectural changes (feat. Nano Banana Pro)
Sample output
For a representative example, take a look at this PR comment: https://github.com/pbakaus/code-review-assistant/pull/1#issuecomment-3568698430
How to Use
Setup
npm install
# Copy and edit .env with your API keys
cp .env.example .env
Required API keys:
- Anthropic: https://console.anthropic.com/
- GitHub: https://github.com/settings/tokens (needs
reposcope) - Gemini (optional): https://makersuite.google.com/app/apikey
- Cloudinary (optional): https://cloudinary.com/console/settings/api
Option 1: CLI Agent (Automation & CI/CD)
Use the bundled agent for automated reviews on any PR:
# Interactive mode (default) - prompts for actions after review
./agent facebook/react#28000
# Non-interactive mode (for CI/CD)
./agent facebook/react#28000 --non-interactive
# Force diagram generation for all PRs
./agent facebook/react#28000 --force-diagrams
CLI Options:
--non-interactive: Skip prompts (for CI/CD pipelines)--force-diagrams: Always generate visual diagrams, even for simple PRs
Interactive Mode (default): After the review, you’ll be prompted to:
- Auto-assign the recommended reviewers via
gh pr edit - Post the review as a PR comment via
gh pr comment
Non-Interactive Mode: Just displays the review and exits (perfect for CI/CD pipelines).
Option 2: Claude Code (Ad-Hoc Reviews)
Use the skill directly in Claude Code for quick reviews during development:
-
Copy skill to your project:
cp -r .claude/skills/code-review-assistant /your/repo/.claude/skills/ -
In Claude Code, ask:
Review the current PR
Claude will automatically:
- Fetch PR using GitHub CLI
- Analyze changes against your team’s standards
- Generate diagrams for complex logic
- Offer to auto-assign reviewers via
gh pr edit - Offer to post the review as a comment via
gh pr comment
Option 3: Agent SDK (Programmatic)
Use the skill programmatically in your own code:
import { query } from '@anthropic-ai/claude-agent-sdk';
for await (const message of query({
prompt: `Review this PR: ${prData}`,
options: {
settingSources: ["user", "project"], // Load skills from filesystem
allowedTools: ["Skill", "Bash", "Read", "Write", "Grep", "Glob", "WebFetch"],
}
})) {
console.log(message);
}
Customization
- Update team expertise: Edit
.claude/skills/code-review-assistant/reference/team-expertise.md
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add pbakaus/code-review-assistant