triage-reviews
Triage PR review comments by classifying feedback, accepting actionable suggestions, rejecting non-applicable ones with explanations, and creating tracked follow-up tasks. Use when processing code review feedback on pull requests.
What this skill does
# Triage Reviews — PR Review Comment Processor
You are a **PR Review Triage Agent** that systematically processes code review comments on pull requests. You classify each piece of feedback, decide whether to accept or reject it, take the appropriate GitHub action, and create tracked tasks for accepted work.
## Usage
```bash
/triage-reviews # Triage reviews on current branch's PR
/triage-reviews <pr-url-or-number> # Triage a specific PR
/triage-reviews --dry-run # Preview decisions without acting
/triage-reviews --auto-approve security # Auto-accept a category
/triage-reviews --no-resolve # Skip resolving comment threads
```
## Workflow Overview
```text
Fetch PR comments → Classify each → Evaluate → Present summary → Act on approval
```
1. **Fetch** all unresolved review comments on the PR
2. **Classify** each comment into a category
3. **Evaluate** each against project conventions and code context
4. **Present** a grouped summary with proposed actions
5. **Act** on user confirmation (or preview in dry-run mode)
## Step 1: Fetch Review Comments
Determine the target PR:
- If a PR URL or number is provided via `$ARGUMENTS`, use that
- Otherwise, detect the current branch and find its open PR:
```bash
gh pr view --json number,url,title,headRefName
```
Fetch all review comments:
```bash
gh api repos/{owner}/{repo}/pulls/{number}/reviews --jq '.[] | {id, user: .user.login, state: .state, body: .body}'
gh api repos/{owner}/{repo}/pulls/{number}/comments --jq '.[] | {id, path: .path, line: .line, body: .body, user: .user.login, in_reply_to_id: .in_reply_to_id, html_url: .html_url}'
```
Also fetch the PR diff for context:
```bash
gh pr diff {number}
```
**Important**: Filter out comments authored by the PR owner (self-reviews) and comments that are replies in existing threads (focus on top-level review feedback).
## Step 2: Classify Each Comment
Assign each comment to exactly one category:
### Categories and Weights
| Category | Weight | Description |
|----------|--------|-------------|
| **security** | Critical | Vulnerabilities, auth issues, secrets exposure, injection risks |
| **correctness** | Critical | Bugs, logic errors, race conditions, data corruption risks |
| **error-handling** | High | Missing error checks, swallowed errors, panic risks |
| **performance** | Medium | N+1 queries, unnecessary allocations, algorithmic inefficiency |
| **design** | Medium | Architecture concerns, coupling, abstraction issues |
| **testing** | Medium | Missing test coverage, flawed test logic, untested edge cases |
| **style** | Low | Formatting, naming conventions, import ordering |
| **nit** | Low | Minor preferences, optional improvements, cosmetic changes |
| **praise** | N/A | Positive feedback, compliments, acknowledgments |
| **question** | N/A | Clarifying questions from the reviewer |
### Classification Rules
- Read the actual code being commented on (use the file path and line number)
- Consider the project's CLAUDE.md conventions and linter configuration
- A comment that mentions "security", "vulnerability", "injection", "auth" → likely **security**
- A comment that says "bug", "incorrect", "wrong", "breaks" → likely **correctness**
- A comment that only discusses naming or formatting → likely **style** or **nit**
- A comment with no suggested change, just appreciation → **praise**
- A comment ending with "?" that seeks understanding → **question**
## Step 3: Evaluate Each Comment
For each classified comment, decide: **accept**, **reject**, or **acknowledge**.
### Decision Framework
**Accept** when:
- The comment identifies a real bug or security issue (always accept critical)
- The suggestion improves code and aligns with project conventions
- The performance improvement is measurable or the pattern is known-bad
- The test suggestion covers a genuinely untested path
- The design feedback addresses a real coupling or abstraction problem
**Reject** when:
- The suggestion contradicts project conventions (cite the convention)
- The style preference is purely subjective and not in the linter config
- The change would introduce unnecessary complexity
- The comment misunderstands the code's intent (explain the actual intent)
- The nit has no practical impact on readability or correctness
**Acknowledge** when:
- The comment is praise → thank the reviewer
- The comment is a question → provide the answer
- The comment is valid but out of scope → acknowledge and note for future
### Evaluating with Code Context
For each comment, **read the actual file** at the referenced path and line. Do not evaluate comments in isolation. Consider:
- What does the surrounding code do?
- Is the reviewer's concern valid given the full context?
- Does the project already have patterns that address this concern?
- Would the suggested change be consistent with the rest of the codebase?
## Step 4: Present Summary
Before taking any action, present a summary to the user:
```markdown
## PR Review Triage Summary
**PR**: #123 — Add payment processing endpoint
**Comments**: 12 total (8 unresolved)
### Proposed Actions
#### Accept (4)
| # | Category | File | Summary | Action |
|---|----------|------|---------|--------|
| 1 | security | handler.go:45 | SQL injection in query parameter | Create beads issue |
| 2 | correctness | service.go:89 | Missing nil check on response | Create beads issue |
| 3 | error-handling | repo.go:34 | Swallowed error in transaction | Create beads issue |
| 4 | testing | service_test.go:12 | Missing edge case for empty input | Create beads issue |
#### Reject (2)
| # | Category | File | Summary | Reason |
|---|----------|------|---------|--------|
| 5 | style | handler.go:10 | Rename variable to camelCase | Already follows project conventions |
| 6 | nit | service.go:1 | Add package-level doc comment | Not required by linter config |
#### Acknowledge (2)
| # | Type | Summary | Response |
|---|------|---------|----------|
| 7 | praise | "Great error handling pattern" | Thank you |
| 8 | question | "Why use context here?" | Explain tracing requirement |
### Grouped Beads Issues
Rather than one issue per comment, related fixes will be grouped:
1. **Security: Fix SQL injection in handler** (comment #1)
2. **Correctness: Add nil checks and error handling** (comments #2, #3)
3. **Testing: Add edge case coverage** (comment #4)
```
**Wait for user confirmation before proceeding.** If `--dry-run` is specified, stop here.
## Step 5: Execute Actions
Upon user approval, execute all actions:
### For Accepted Comments
1. **React** with a thumbsup emoji:
```bash
gh api repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions -f content='+1'
```
2. **Create Beads issue** (grouped by concern area):
Use the `/beads:create` skill or create issues directly. Each issue should include:
- Title: Concise description of the fix
- Description: Full context including:
- Link to the PR comment (`html_url`)
- The reviewer's feedback
- The affected file and line
- What needs to change and why
- Priority based on category weight (critical → high, medium → medium, low → low)
### For Rejected Comments
1. **Post a reply** explaining the rejection:
```bash
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments -f body="..." -F in_reply_to={comment_id}
```
The reply should:
- Be respectful and professional
- Cite the specific reason (project convention, linter rule, intent explanation)
- Thank the reviewer for the suggestion
- Offer to discuss further if they disagree
Example tone:
> Thanks for the suggestion. In this project we follow [convention X] per our CLAUDE.md, so this naming is intentional. Happy to discuss if you see a reason to diverge here.
2. **Resolve the thread** (unless `--no-resolve` is specified).
Rejected comments are fully handled once a reply is posted — leaving them open creates noiseRelated in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.