prfeedback
Parse PR review comments, categorize them, and create beads tasks for required changes
What this skill does
# Handle PR Review Feedback
Parses PR review comments from GitHub, categorizes them by type and priority, and creates beads tasks for required changes. Supports marking the PR ready for re-review once all blocking comments are addressed.
## Usage
```bash
# Process PR feedback
/bkff:prfeedback --pr=123
# Process by URL
/bkff:prfeedback --pr=https://github.com/owner/repo/pull/123
# Mark ready for re-review after addressing comments
/bkff:prfeedback --pr=123 --ready=true
# Output as JSON for automation
/bkff:prfeedback --pr=123 --format=json
```
## Comment Categorization Logic
Comments are categorized by type and priority based on content analysis:
```
┌─────────────────────────────────────────────────────────────┐
│ COMMENT CATEGORIZATION │
└─────────────────────────────────────────────────────────────┘
┌────────────────────────────────────┐
│ FETCH PR COMMENTS │
│ • Review comments │
│ • Inline code comments │
│ • Conversation threads │
└─────────────┬──────────────────────┘
│
▼
┌────────────────────────────────────┐
│ ANALYZE EACH COMMENT │
│ • Extract action indicators │
│ • Detect blocking keywords │
│ • Identify suggestions │
│ • Check resolution status │
└─────────────┬──────────────────────┘
│
▼
┌────────────────────────────────────┐
│ CATEGORIZE │
├────────────────────────────────────┤
│ Type: │
│ • BLOCKING - Must fix │
│ • SUGGESTION - Should consider │
│ • QUESTION - Needs response │
│ • PRAISE - No action needed │
│ • NIT - Minor/optional │
│ │
│ Priority: │
│ • P0 - Critical/Security │
│ • P1 - Must fix before merge │
│ • P2 - Should fix │
│ • P3 - Nice to have │
└────────────────────────────────────┘
```
### Category Detection Rules
| Category | Detected By | Priority |
|----------|-------------|----------|
| BLOCKING | "must", "required", "fix", "blocker", changes_requested review | P1 |
| SECURITY | "vulnerability", "security", "XSS", "injection", "CVE" | P0 |
| SUGGESTION | "suggest", "consider", "could", "might", "optional" | P2 |
| QUESTION | "?", "why", "how", "what", "can you explain" | P2 |
| NIT | "nit:", "nitpick", "minor", "style" | P3 |
| PRAISE | "LGTM", "nice", "great", "well done", approved review | None |
### Keyword Patterns
```
BLOCKING patterns:
- "please fix"
- "this needs to"
- "must be"
- "required"
- "blocker"
- "cannot merge until"
- Review state: CHANGES_REQUESTED
SECURITY patterns:
- "security"
- "vulnerability"
- "injection"
- "XSS"
- "CSRF"
- "authentication"
- "authorization"
- "CVE-"
SUGGESTION patterns:
- "consider"
- "suggestion:"
- "you could"
- "might want to"
- "alternatively"
- "optional:"
NIT patterns:
- "nit:"
- "nitpick"
- "minor:"
- "style:"
- "formatting"
```
## Beads Task Creation for Required Changes
When blocking or high-priority comments are found, beads tasks are created:
```
┌─────────────────────────────────────────────────────────────┐
│ TASK CREATION FLOW │
└─────────────────────────────────────────────────────────────┘
Categorized Comments:
┌────────────────────────────────────┐
│ BLOCKING: 2 comments │
│ SECURITY: 1 comment │
│ SUGGESTION: 3 comments │
│ NIT: 2 comments │
└─────────────┬──────────────────────┘
│
│ Create tasks for P0-P2
▼
┌────────────────────────────────────┐
│ CREATE BEADS TASKS │
├────────────────────────────────────┤
│ │
│ bd create --type=task │
│ --title="PR #123: Fix SQL │
│ injection in query" │
│ --priority=0 │
│ --description="..." │
│ │
│ bd create --type=task │
│ --title="PR #123: Add input │
│ validation" │
│ --priority=1 │
│ --description="..." │
│ │
└─────────────┬──────────────────────┘
│
│ Link to parent issue
▼
┌────────────────────────────────────┐
│ SET DEPENDENCIES │
│ │
│ • Link tasks to PR feature/epic │
│ • Add dependency on PR approval │
└────────────────────────────────────┘
```
### Task Format
```markdown
Title: PR #123: [Comment summary]
Description:
From PR review comment by @reviewer:
> [Original comment text]
File: src/api/query.ts
Line: 42
Action Required:
[Extracted action from comment]
---
PR: https://github.com/owner/repo/pull/123
Comment: https://github.com/owner/repo/pull/123#discussion_r123456
```
### Task Creation Rules
| Comment Type | Task Created | Priority |
|--------------|--------------|----------|
| SECURITY | Yes | P0 |
| BLOCKING | Yes | P1 |
| SUGGESTION (with "should") | Yes | P2 |
| SUGGESTION (with "could") | No (logged only) | - |
| QUESTION | No (needs response) | - |
| NIT | No (logged only) | - |
| PRAISE | No | - |
## --ready Flag for Re-Review
When `--ready=true` is specified:
```
┌─────────────────────────────────────────────────────────────┐
│ RE-REVIEW FLOW │
└─────────────────────────────────────────────────────────────┘
┌────────────────────────────────────┐
│ CHECK BLOCKING COMMENTS │
│ │
│ Scan for unresolved BLOCKING and │
│ SECURITY comments │
└─────────────┬──────────────────────┘
│
┌─────────┴─────────┐
│ │
▼ ▼
┌──────────┐ ┌──────────────────┐
│ All │ │ Unresolved │
│ Resolved │ │ Comments Remain │
└────┬─────┘ └────────┬─────────┘
│ │
▼ ▼
┌──────────────┐ ┌──────────────────┐
│ Request │ │ List unresolved │
│ Re-review │ │ Exit with error │
│ via gh CLI │ │ │
└──────────────┘ └──────────────────┘
Re-review request:
gh pr ready 123
gh pr edit 123 --add-reviewer @original-reviewer
```
### Re-Review Checklist
Before marking ready:
1. All BLOCKING comments resolved
2. All SECURITY comments resolved
3. All created beads tasks closed
4. Tests passing (checked via CI status)
5. Optional: Response to all QUESTION comments
## Stale Comment Handling
Comments may become stale when code changes after the review:
```
┌─────────────────────────────────────────────────────────────┐
│ STALE DETECTION │
└─────────────────────────────────────────────────────────────┘
Comment on src/api/query.ts:42
┌────────────────────────────────────┐
│ @reviewer: "Fix the SQL injection" │
│ Posted: 2 days ago │
│ Line content: "SELECT * FROM..." │
└────────────────────────────────────┘
│
│ Compare with current
▼
Current src/api/query.ts:42
┌────────────────────────────────────┐
│ // Using parameterized queries │
│ Line changed since comment │
└────────────────────────────────────┘
│
▼
┌────────────────────────────────────┐
│ STALE COMMENT DETECTED │
│ │
│ Possible reasons: │
│ • Already addressed │
│ • Code refactored │
│ • Line moved │
│ │
│ Action: Mark as potentially stale │
│ Require manual verification │
└────────────────────────────────────┘
``Related 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.