Loading...
Loading...
Comprehensive pull request review using specialized agents
npx skill4agent add neolabhq/context-engineering-kit review-pr$ARGUMENTSspec/reports/$ARGUMENTS| Argument | Format | Default | Description |
|---|---|---|---|
| Free text | None | Optional review aspects or focus areas for the review (e.g., "security, performance") |
| | | Minimum impact level for issues to be published as inline comments. Values: |
| Level | Impact Score Range |
|---|---|
| 81-100 |
| 61-80 |
| 41-60 |
| 21-40 |
| 0-20 |
$ARGUMENTS# Extract review aspects (free text, everything that is not a flag)
REVIEW_ASPECTS = all non-flag text from $ARGUMENTS
# Parse flags
MIN_IMPACT = --min-impact || "high"
# Resolve minimum impact score from level name
MIN_IMPACT_SCORE = lookup MIN_IMPACT in Impact Level Mapping:
"critical" -> 81
"high" -> 61
"medium" -> 41
"medium-low" -> 21
"low" -> 0$ARGUMENTSREVIEW_ASPECTSMIN_IMPACTMIN_IMPACT_SCOREGOAL: Analyse PR changes in following files and provide summary
Perform following steps:
- Run [pass proper git command that he can use] to see changes in files
- Analyse following files: [list of files]
Please return a detailed summary of the changes in the each file, including types of changes, their complexity, affected classes/functions/variables/etc., and overall description of the changes.| Impact Score | Minimum Confidence Required | Rationale |
|---|---|---|
| 81-100 (Critical) | 50 | Critical issues warrant investigation even with moderate confidence |
| 61-80 (High) | 65 | High impact issues need good confidence to avoid false alarms |
| 41-60 (Medium) | 75 | Medium issues need high confidence to justify addressing |
| 21-40 (Medium-Low) | 85 | Low-medium impact issues need very high confidence |
| 0-20 (Low) | 95 | Minor issues only included if nearly certain |
MIN_IMPACTMIN_IMPACT_SCORE--min-impacthighMIN_IMPACTmcp__github_inline_comment__create_inline_commentgit:attach-review-to-prgh api repos/{owner}/{repo}/pulls/{pr_number}/reviewsgh api repos/{owner}/{repo}/pulls/{pr_number}/commentsghgit:attach-review-to-prgh api repos/{owner}/{repo}/pulls/{pr_number}/reviewsgh api repos/{owner}/{repo}/pulls/{pr_number}/commentsgit:attach-review-to-pr🔴/🟠/🟡/🟢 [Critical/High/Medium/Low]: [Brief description]
[Evidence: Explain what code pattern/behavior was observed that indicates this issue and the consequence if left unfixed]
[If applicable, provide code suggestion]:
```suggestion
[code here]
#### Example for Bug Issue
```markdown
🟠 High: Potential null pointer dereference
Variable `user` is accessed without null check after fetching from database. This will cause runtime error if user is not found, breaking the user profile feature.
```suggestion
if (!user) {
throw new Error('User not found');
}
#### Example for Security Issue
```markdown
🔴 Critical: SQL Injection vulnerability
User input is directly concatenated into SQL query without sanitization. Attackers can execute arbitrary SQL commands, leading to data breach or deletion.
Use parameterized queries instead:
```suggestion
db.query('SELECT * FROM users WHERE id = ?', [userId])
### Template for inline comments using GitHub API
#### Multiple Issues (using `/reviews` endpoint)
When using `gh api repos/{owner}/{repo}/pulls/{pr_number}/reviews`, each comment in the `comments` array uses the line-specific template above (Issue Category, Evidence, Impact/Severity, Confidence, Suggested Fix).
#### Single Issue (using `/comments` endpoint)
When using `gh api repos/{owner}/{repo}/pulls/{pr_number}/comments`, post just one line-specific comment using the template above.
**Note for linking to code:**
- Use full git sha + line range, eg. `https://github.com/owner/repo/blob/1d54823877c4de72b2316a64032a54afc404e619/README.md#L13-L17`
- Line range format is `L[start]-L[end]`
- Provide at least 1 line of context before and after
**Evaluation Instructions:**
- **Security First**: Any High or Critical security issue automatically becomes blocker
- **Quantify Everything**: Use numbers, not words like "some", "many", "few"
- **Skip Trivial Issues** in large PRs (>500 lines): Focus on architectural and security issues
#### If you found no issues
Do not post any comments. Simply report to the user that no issues were found.
## Remember
The goal is to catch bugs and security issues, improve code quality while maintaining development velocity, not to enforce perfection. Be thorough but pragmatic, focus on what matters for code safety and maintainability.