Claude Code PR Automation
Overview
Claude Code PR Automation is a custom skill for Claude Code that automates the entire pull request review workflow. It uses specialized AI agents to comprehensively review your code, post reviews to GitHub, fix issues with your approval, and iterate until your PR is ready to merge.
What It Does
- 🔍 Comprehensive Code Reviews - Uses 5 specialized AI agents in parallel
- 📝 Automated Review Comments - Posts detailed feedback to GitHub PRs
- 🔧 Auto-Fix with Approval - Fixes issues automatically after you approve
- 🔄 Iterative Improvement - Re-reviews until PR is mergeable
- ✅ Final Approval - Approves PR when all critical issues are resolved
Features
🤖 5 Specialized Review Agents
| Agent | Purpose | Confidence |
|---|
| code-reviewer | General code quality, security, performance | 90-100% |
| silent-failure-hunter | Error handling, edge cases, fallback behavior | 90-100% |
| type-design-analyzer | Type safety, encapsulation, invariants | 80-89% |
| pr-test-analyzer | Test coverage, edge cases, test quality | 80-89% |
| comment-analyzer | Documentation accuracy, completeness | 70-79% |
🎯 Smart Issue Prioritization
- Critical (90-100%) - Must fix before merge (security, crashes, breaking changes)
- High (80-89%) - Should fix (performance, best practices, type safety)
- Medium (70-79%) - Nice to have (code style, documentation)
🔄 Automated Workflow
- Fetch PR from GitHub
- Launch all review agents in parallel
- Aggregate findings by priority
- Post comprehensive review to GitHub
- Ask for approval before fixing issues
- Apply fixes and push to branch
- Re-run review (max 5 iterations)
- Approve PR when ready
Installation
Option 1: Install as Plugin (Recommended) ⭐
Easy installation and updates via plugin system!
# Add marketplace (one-time setup)
/plugin marketplace add https://github.com/fanioz/claude-code-pr-automation
# Install the plugin
/plugin install pr-automation
# Or install directly from GitHub
/plugin install https://github.com/fanioz/claude-code-pr-automation
# Verify installation
/plugin list
# Should show: pr-automation
Benefits of plugin installation:
- ✅ Easy installation with one command
- ✅ Automatic updates via
/plugin marketplace update
- ✅ Clean uninstall with
/plugin uninstall pr-automation
- ✅ Scoped installation (user/project/local)
- ✅ Version management
Option 2: Manual Installation (Skill Only)
# Clone the repository
git clone https://github.com/fanioz/claude-code-pr-automation.git
cd claude-code-pr-automation
# Copy skill to your Claude skills directory
cp -r skills/pr-automation ~/.claude/skills/
# Verify installation
ls ~/.claude/skills/pr-automation/
# Should show: SKILL.md, reference.md, templates/
Option 3: Install as Project Skill
# In your project directory
mkdir -p .claude/skills
cp -r skills/pr-automation .claude/skills/
# Commit to your repo
git add .claude/skills/pr-automation
git commit -m "Add PR automation skill"
Prerequisites
Usage
Basic Usage
# Start Claude Code
claude
# Trigger the skill with natural language
You: Review PR 28
You: Check PR 123 for issues
You: Review this PR and fix any problems
You: Iterate on PR 45 until it's ready to merge
Skill Triggers
The skill automatically activates when you use phrases like:
- "Review PR [number]"
- "Check pull request for issues"
- "Fix PR problems"
- "Review this PR"
- "Check if there are any issues"
- "Review and fix"
What Happens
- PR Detection - Skill identifies which PR to review
- Agent Launch - 5 specialized agents analyze your code in parallel
- Review Aggregation - Findings organized by priority
- GitHub Review - Comprehensive review posted to GitHub
- Fix Approval - You're asked to approve fixes
- Auto-Fix - Issues fixed and pushed to branch (if approved)
- Iteration - Process repeats until PR is ready