Reviews pull requests created by GitHub Copilot agents before merging. Triggers on "review this PR", "check PR
This skill reviews pull requests created by GitHub Copilot agents to ensure quality, correctness, and alignment with project standards before merging.
Auto-trigger when:
Manual trigger:
Ensure all agent-created pull requests meet quality standards:
See checklists/ directory for domain-specific checklists:
frontend-review.md - React, UI, componentsbackend-review.md - API, database, servertesting-review.md - Test quality and coveragesecurity-review.md - Security considerationsperformance-review.md - Performance impactUse GitHub MCP to get PR details:
// Get PR metadata
const pr = await mcp__github__pull_request_read({
method: "get",
owner: "{owner}",
repo: "{repo}",
pullNumber: prNumber
})
// Get changed files
const files = await mcp__github__pull_request_read({
method: "get_files",
owner: "{owner}",
repo: "{repo}",
pullNumber: prNumber
})
// Get CI/CD status
const checks = await mcp__github__pull_request_read({
method: "get_status",
owner: "{owner}",
repo: "{repo}",
pullNumber: prNumber
})
Verify PR has:
pr.mergeable === true)checks.every(c => c.conclusion === "success"))Create pending review:
await mcp__github__pull_request_review_write({
method: "create",
owner: "{owner}",
repo: "{repo}",
pullNumber: prNumber,
body: "Reviewing changes..."
})
Analyze each file using domain-specific checklist:
Add inline comments for issues:
await mcp__github__add_comment_to_pending_review({
owner: "{owner}",
repo: "{repo}",
pullNumber: prNumber,
path: "client/src/components/Profile.tsx",
body: "🚫 **Blocking**: Remove console.log before merging.",
line: 42,
side: "RIGHT",
subjectType: "LINE"
})
Verify:
Check:
For changes involving:
Verify no new vulnerabilities introduced.
Before approval:
npm run check passes (TypeScript)When: PR meets all quality standards, inline comments added
Submit approval:
await mcp__github__pull_request_review_write({
method: "submit_pending",
owner: "{owner}",
repo: "{repo}",
pullNumber: prNumber,
body: `## Review: APPROVED ✅
This PR looks great! All quality checks passed.
**Verified**:
- ✅ Code correctness
- ✅ Test coverage
- ✅ No regressions
- ✅ Style compliance
- ✅ Security
- ✅ Performance
**Ready to merge**: Yes
**Suggested next steps**: Merge and close #${issueNumber}`,
event: "APPROVE"
})
When: PR has blocking issues (already added as inline comments)
Submit change request:
await mcp__github__pull_request_review_write({
method: "submit_pending",
owner: "{owner}",
repo: "{repo}",
pullNumber: prNumber,
body: `## Review: CHANGES REQUESTED 🔄
Found ${blockingIssues.length} blocking issue(s) that need attention.
All issues have been marked inline with specific line comments.
### Summary
- 🚫 Blocking: ${blockingIssues.length}
- 💡 Suggestions: ${suggestions.length}
Please address the blocking issues and update the PR.`,
event: "REQUEST_CHANGES"
})
Note: Individual issues are already added as inline comments via add_comment_to_pending_review
PR has architectural or approach concerns:
## Review: DISCUSSION NEEDED ⚠️
The implementation works, but I have concerns about the approach.
### Concerns
1. **[Concern 1]**
- What: [What's concerning]
- Why: [Why it's a problem]
- Alternatives: [Alternative approaches]
2. **[Concern 2]**
- What: [What's concerning]
- Why: [Why it's a problem]
- Alternatives: [Alternative approaches]
**Recommendation**: Let's discuss the approach before proceeding.
@[User] please weigh in on preferred approach.
Provide constructive feedback to improve agent work:
**Nice work on**:
- Clean separation of concerns in the API layer
- Comprehensive test coverage
- Good error handling patterns
**For future PRs**:
- Consider extracting this 50-line function into smaller units
- Add JSDoc comments for complex logic
- Use `const` instead of `let` where possible
Review happens at transition points:
Phase 1: Backend
↓
PR #200 created
↓
🔍 PR Review (this skill)
↓
✅ Approved & Merged
↓
Phase 2: Frontend (unblocked)
npm run check cleanExtra checks:
Extra checks:
Extra checks:
Extra checks:
checklists/ directoryreference/review-templates.mdreference/common-issues.md# PR Review Summary: #[PR-NUM]
**PR Title**: [Title]
**Issue**: #[issue-num]
**Agent**: @[Agent-Name]-Specialist
**Changes**: [Brief description]
## Review Status: [APPROVED ✅ | CHANGES REQUESTED 🔄 | DISCUSSION NEEDED ⚠️]
### Code Quality: [✅ | ⚠️ | ❌]
[Comments]
### Test Coverage: [✅ | ⚠️ | ❌]
[Comments]
### Security: [✅ | ⚠️ | ❌]
[Comments]
### Performance: [✅ | ⚠️ | ❌]
[Comments]
## Blocking Issues
[List or "None"]
## Suggestions
[List or "None"]
## Next Steps
[What should happen next]
**Reviewed by**: copilot-pr-reviewer skill
**Reviewed at**: [Timestamp]