/software-engineering:analyze-pr <pr-number>from software-engineering
Reviews pull requests across GitHub, GitLab, and Forgejo for code quality, security vulnerabilities, test coverage, and documentation completeness using parallel agents.
Ships in software-engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Perform comprehensive analysis of a pull request including code review, security scan, and test coverage.
Detect Repository Type: Use the detect-repo-host skill to identify the hosting service (GitHub, GitLab, or Forgejo) and extract owner/repo details.
Fetch PR Details: Use the appropriate CLI
GitHub: gh pr view <number> --json title,body,author,files,commits, gh pr diff <number>
GitLab: glab mr view <number>, glab mr diff <number>
Forgejo: fgj pr view <number> -R <owner>/<repo> --json for metadata. fgj has no pr diff subcommand — obtain the diff via a git fallback:
fgj pr view JSON, read the head and base branch names.git fetch origingit diff origin/<base>...origin/<head>This works for same-repo PRs (both branches exist on origin); it does not cover cross-fork PRs whose head lives in a different repository. As a secondary option, fetch the diff directly from the Forgejo API: GET <api_base>/repos/<owner>/<repo>/pulls/<n>.diff, where <api_base> is the field returned by the detect-repo-host skill (e.g. https://git.sylvlab.fr/api/v1). Never hardcode a host — it breaks on every other Forgejo instance.
Analyze Changes: Launch 4 parallel Sonnet agents to independently review the pull request:
Agent #1: Code Quality Review (code-review-enforcer agent)
Agent #2: Security Analysis (security-auditor agent)
Agent #3: Test Coverage Assessment
Agent #4: Documentation Validation
Validate Findings with Haiku Agents: For each issue found by the 4 agents above, launch a parallel Haiku agent to score confidence (0-100):
Filter out issues with confidence score < 75 before including in report (confidence-75 "highly confident" issues are kept, matching the rubric anchors above).
Launch agents concurrently using the Task tool:
# Fetch PR details first
pr_details = Bash("gh pr view ${pr_number} --json title,body,author,headRefName,baseRefName,files,commits,labels,reviewDecision")
pr_diff = Bash("gh pr diff ${pr_number}")
# For GitLab: glab mr view ${mr_number}, glab mr diff ${mr_number}
# For Forgejo: pr_details = fgj pr view ${pr_number} -R <owner>/<repo> --json
# (fgj has no pr diff) read head/base from pr_details, then:
# git fetch origin; pr_diff = git diff origin/<base>...origin/<head>
# (same-repo PRs only; for cross-fork use GET <api_base>/repos/<owner>/<repo>/pulls/${pr_number}.diff)
# Launch 4 parallel Sonnet agents for analysis
Task(subagent_type: "code-review-enforcer", model: "sonnet", prompt: "Review PR #${pr_number} for code quality issues. Modified files: ${pr_files}. Diff: ${pr_diff}. Return findings with severity and line numbers.")
Task(subagent_type: "security-auditor", model: "sonnet", prompt: "Scan PR #${pr_number} for security vulnerabilities. Focus on auth/crypto changes. Files: ${pr_files}. Return security findings with severity.")
Task(subagent_type: "general-purpose", model: "sonnet", prompt: "Analyze PR #${pr_number} test coverage. New functionality: ${extract_new_features(pr_diff)}. Verify tests added. Return missing test scenarios.")
Task(subagent_type: "general-purpose", model: "sonnet", prompt: "Validate PR #${pr_number} documentation. API changes: ${extract_api_changes(pr_diff)}. Check README/docs updated. Return missing docs.")
These agents run independently and results are aggregated in step 5.
Generate Report: Create structured markdown report with:
Optional: Ask user if they want to post review comments to PR
# Pull Request Analysis: #123
## Summary
- **Title**: [PR title]
- **Author**: [author]
- **Files Changed**: X files (+Y, -Z lines)
- **Commits**: N commits
## Code Quality ⭐⭐⭐⭐☆
- ✅ Follows coding standards
- ⚠️ Missing error handling in auth.go:45
- ⚠️ Consider extracting helper function in parser.go:120
## Security 🔒
- ✅ No security vulnerabilities detected
- ✅ Authentication changes properly reviewed
## Test Coverage 🧪
- ✅ Unit tests added for new functionality
- ❌ Missing integration tests for API endpoints
## Documentation 📚
- ✅ README.md updated with new feature
- ✅ API documentation current
## Overall Recommendation
**REQUEST CHANGES** - Address error handling and add integration tests
## Action Items
1. Add error handling in auth.go:45
2. Add integration tests for /api/users endpoint
3. Consider refactoring parser.go:120-150
# Analyze GitHub PR
/analyze-pr 123
# Analyze GitLab MR
/analyze-pr 456
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub sgaunet/claude-plugins --plugin software-engineering18 skills in this plugin
/analyze-and-create-issueAnalyze codebase and create GitHub/GitLab/Forgejo issues per finding/audit-codebaseAudit security, performance, and best practices holistically/auto-mrPush current branch, create MR/PR on GitHub, GitLab, or Forgejo, wait for CI pipeline, merge, and clean up branch using auto-mr CLI/check-claude-md-tokensMonitor and optimize CLAUDE.md token count to stay under 2500 token limit/commitCreate conventional commit from staged changes with approval/create-issueCreate formatted GitHub/GitLab/Forgejo issue with approvalOther plugins' skills for the same job