pr-reviewer
Autonomous AI-powered pull request reviewer with multi-agent analysis and comprehensive feedback
What this skill does
# Autonomous PR Reviewer
**โก UNIQUE FEATURE**: Multi-agent review system with specialized reviewers for security, performance, testing, and architecture - the first autonomous PR review skill with parallel agent coordination.
## What This Skill Does
Automatically reviews pull requests with multiple specialized AI agents working in parallel:
- **Security Agent**: Scans for vulnerabilities, SQL injection, XSS, hardcoded secrets
- **Performance Agent**: Identifies bottlenecks, inefficient algorithms, memory leaks
- **Testing Agent**: Validates test coverage, suggests additional test cases
- **Architecture Agent**: Reviews design patterns, code structure, maintainability
- **Style Agent**: Checks code style, naming conventions, documentation
## Why This Is Unique
Unlike simple code review tools, this skill:
- **Runs 5 specialized agents in parallel** for comprehensive analysis
- **Provides actionable suggestions** with code examples
- **Generates review summaries** for different audiences (technical/non-technical)
- **Auto-suggests fixes** that you can apply with one command
- **Learns from your codebase** patterns and conventions
## Instructions
### Phase 1: Setup and Discovery
1. **Identify the PR**:
- Use Bash to get current branch and diff: `git diff main...HEAD`
- Or accept PR number/URL from user
- Use Bash: `gh pr view <number>` to get PR details
2. **Gather Context**:
- Use Glob to find all changed files
- Use Read to examine modified code
- Use Grep to search for related code patterns
- Identify programming languages and frameworks
### Phase 2: Multi-Agent Review (Parallel Execution)
Launch 5 specialized Task agents in parallel:
**Agent 1: Security Reviewer**
```
Task: Security analysis of PR
Prompt: "Analyze these code changes for security vulnerabilities:
- SQL injection risks
- XSS vulnerabilities
- Hardcoded secrets or API keys
- Authentication/authorization issues
- Dependency vulnerabilities
- OWASP Top 10 issues
Files: [list changed files]
Provide:
1. Severity ratings (Critical/High/Medium/Low)
2. Specific line numbers
3. Exploitation scenarios
4. Remediation steps with code examples"
```
**Agent 2: Performance Reviewer**
```
Task: Performance analysis of PR
Prompt: "Analyze these code changes for performance issues:
- Inefficient algorithms (O(nยฒ) vs O(n log n))
- Database N+1 queries
- Memory leaks
- Unnecessary re-renders (React/Vue)
- Blocking operations
- Resource waste
Files: [list changed files]
Provide:
1. Performance impact assessment
2. Specific bottlenecks with line numbers
3. Benchmark comparison suggestions
4. Optimized code examples"
```
**Agent 3: Testing Reviewer**
```
Task: Test coverage analysis of PR
Prompt: "Analyze test coverage and quality:
- Calculate test coverage for changed code
- Identify untested edge cases
- Review test quality and assertions
- Suggest additional test scenarios
- Check for test best practices
Files: [list changed files]
Provide:
1. Coverage percentage
2. Missing test cases
3. Test improvement suggestions
4. Example test code"
```
**Agent 4: Architecture Reviewer**
```
Task: Architecture and design analysis
Prompt: "Review architectural decisions:
- Design pattern appropriateness
- SOLID principles adherence
- Code modularity and coupling
- Separation of concerns
- Scalability considerations
- Technical debt introduced
Files: [list changed files]
Provide:
1. Architecture assessment
2. Design improvement suggestions
3. Refactoring recommendations
4. Long-term impact analysis"
```
**Agent 5: Style & Documentation Reviewer**
```
Task: Code style and documentation review
Prompt: "Review code style and documentation:
- Naming conventions
- Code readability
- Comment quality
- API documentation
- README updates needed
- Breaking changes documented
Files: [list changed files]
Provide:
1. Style issues with line numbers
2. Documentation gaps
3. Readability improvements
4. Suggested comments"
```
### Phase 3: Synthesis and Reporting
1. **Collect all agent results** (wait for all Task agents to complete)
2. **Generate comprehensive review**:
```markdown
# PR Review Summary
## ๐ Overview
- Files changed: X
- Lines added: Y
- Lines removed: Z
- Overall rating: [Excellent/Good/Needs Work/Reject]
## ๐ Security (Critical: X, High: Y, Medium: Z)
[Agent 1 findings summary]
## โก Performance (Issues: X)
[Agent 2 findings summary]
## โ
Testing (Coverage: X%)
[Agent 3 findings summary]
## ๐๏ธ Architecture
[Agent 4 findings summary]
## ๐ Style & Documentation
[Agent 5 findings summary]
## ๐ฏ Action Items
1. [Priority action with fix]
2. [Priority action with fix]
## ๐ก Suggested Changes
[Code blocks with suggested improvements]
## โจ Highlights
[Positive aspects of the PR]
```
3. **Generate fix suggestions**:
- Create a `pr-review-fixes.md` file with all suggested changes
- Optionally create a `pr-review-fixes.patch` file
### Phase 4: Interactive Options
Offer the user:
1. **Post review as comment**: Use Bash `gh pr comment <number> -F pr-review.md`
2. **Apply suggested fixes**: Use Edit to apply recommended changes
3. **Re-run specific agent**: Re-analyze with one agent for updated code
4. **Generate test cases**: Create tests based on Testing Agent suggestions
5. **Export report**: Save review in multiple formats (markdown, JSON, HTML)
## Examples
### Example 1: GitHub PR Review
**User Request:**
"Review PR #123"
**Workflow:**
1. Fetch PR: `gh pr view 123`
2. Launch 5 agents in parallel (use Task tool 5 times in one message)
3. Wait for all agents to complete
4. Synthesize results
5. Present comprehensive review
6. Offer to post comment or apply fixes
**Output:**
```
๐ PR #123 Review Complete
๐ Overall: Good (minor improvements needed)
๐ Security: โ
No issues found
โก Performance: โ ๏ธ 1 issue found
โ
Testing: โ ๏ธ Coverage 78% (target: 80%)
๐๏ธ Architecture: โ
Well designed
๐ Style: โ ๏ธ 3 minor issues
๐ Action Items:
1. Add database index for user_id column (performance)
2. Add tests for error scenarios (testing)
3. Update function documentation (style)
Would you like me to:
1. Post this review as a PR comment
2. Apply the suggested fixes
3. Generate the missing tests
```
### Example 2: Local Branch Review
**User Request:**
"Review my current changes before I push"
**Workflow:**
1. Run: `git diff main...HEAD`
2. Analyze changes with 5 agents
3. Provide feedback before push
4. Optionally fix issues
## Configuration
Customize review behavior:
```yaml
# .pr-reviewer-config.yml
agents:
security:
enabled: true
severity_threshold: medium
performance:
enabled: true
benchmark_required: false
testing:
enabled: true
min_coverage: 80
architecture:
enabled: true
check_solid: true
style:
enabled: true
follow_existing: true
review:
auto_post_comment: false
suggest_fixes: true
blocking_issues: [critical_security, zero_tests]
```
## Tool Requirements
- **Read**: Examine code changes
- **Bash**: Git operations, gh CLI for PR interaction
- **Grep**: Search codebase for patterns
- **Glob**: Find related files
- **Task**: Launch specialized review agents (KEY FEATURE)
- **Write**: Create review reports and fix files
## Limitations
- Requires `gh` CLI installed for PR operations
- Best results with code <10,000 lines changed per PR
- Security agent cannot detect all vulnerabilities (not a replacement for dedicated security tools)
- Performance suggestions may need benchmarking to validate
- Works best with supported languages (Python, JavaScript, TypeScript, Go, Rust, Java)
## Advanced Features
### 1. Incremental Review Mode
Review only new commits since last review:
```bash
git diff PR_BASE...HEAD --since="last review"
```
### 2. Custom Agent Addition
Add your own specialized agents:
- Accessibility reviewer (WCAG compliance)
- Localization reviewer (i18n/l10n)
- API contract reviewer (OpenAPI schema changes)Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts โ single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score โฅ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.