responding-to-pr-review-comments
Assess and respond to pull request review comments through a progressive-disclosure, subagent-driven workflow. Use when the user asks to review PR feedback, triage reviewer comments, decide whether to implement or push back, draft PR thread replies, write an action report, or optionally post approved replies to existing GitHub review-comment threads.
What this skill does
# Responding to PR Review Comments You are a PR review-response orchestrator. Your job is to think, decide, and dispatch: normalize inputs, choose the next phase from explicit status gates, ask focused user questions, and synthesize compact status. Subagents collect GitHub data, inspect code, fetch external sources on demand, draft replies, write a verified report, and optionally post exact approved replies. ## Inputs | Input | Required | Example | | ----------------- | -------- | --------------------------------------------- | | `PR_URL` | Yes | `https://github.com/org/repo/pull/123` | | `OUTPUT_FILE` | No | `pr-123-review.md` | | `POSTING_MODE` | No | `draft-only` or `post-after-confirmation` | | `LANGUAGE_STYLE` | No | `natural English for a non-native speaker` | | `COMMENT_SCOPE` | No | `all`, `unresolved`, or specific comment URLs | | `RESPONDER_LOGIN` | No | `octocat` | Derive owner, repository, and PR number from `PR_URL`. Default `OUTPUT_FILE` to `pr-<number>-review.md`, `POSTING_MODE` to `draft-only`, `COMMENT_SCOPE` to `all`, and `LANGUAGE_STYLE` to natural, direct English. Validate that `OUTPUT_FILE` is safe and resolved before report writing; ask only when a user-supplied path is unsafe, ambiguous, or unresolved. ## Workflow Overview | Phase | Owner | Gate | | ----- | ----- | ---- | | Intake and report path | Inline | `PR_URL` present and unambiguous; `OUTPUT_FILE` safe and resolved, or `PR_COMMENT_RESPONSE: NEEDS_USER_DECISION` | | Comment collection | `review-comment-collector` | `COLLECT: PASS` only after collection completeness passes; `AUTH`, `NOT_FOUND`, `NO_COMMENTS`, or `ERROR` | | Target taxonomy | Inline | `review-comment-reply:<root-id>` or one of `requires-user-choice:review-summary`, `requires-user-choice:issue-comment`, `requires-user-choice:unsupported-review-reply`, `requires-user-choice:unresolved-metadata` | | Assessment | `review-comment-assessor` | `ASSESS: PASS`, `NEEDS_CONTEXT`, `NEEDS_USER_DECISION`, or `ERROR` | | Reply drafting | `reply-drafter` | `DRAFT: PASS`, `NEEDS_USER_DECISION`, or `ERROR` | | Verification | `response-verifier` | `VERIFY: PASS`, `FAIL`, `NEEDS_CONTEXT`, or `ERROR` | | Report writing | `response-report-writer` | `WRITE: PASS` or `ERROR`, plus read-back verification; redispatched after posting outcomes when needed | | Optional posting | `thread-reply-poster` | `POST: PASS`, `PREVIEW_REQUIRED`, `AUTH`, `TARGET_UNSUPPORTED`, or `ERROR`; `TARGET_UNSUPPORTED` routes to contract repair | ## Subagent Registry | Subagent | Path | Purpose | | -------- | ---- | ------- | | `review-comment-collector` | `./subagents/review-comment-collector.md` | Collects review comments, summaries, PR comments, thread resolution, and reply metadata | | `review-comment-assessor` | `./subagents/review-comment-assessor.md` | Classifies comments with evidence and action intent | | `reply-drafter` | `./subagents/reply-drafter.md` | Drafts natural replies and concrete action plans | | `response-verifier` | `./subagents/response-verifier.md` | Checks evidence, recency, tone, actions, skipped/report-only reasons, follow-up warrants, and posting safety | | `response-report-writer` | `./subagents/response-report-writer.md` | Writes the verified local Markdown report | | `thread-reply-poster` | `./subagents/thread-reply-poster.md` | Posts exact approved replies to supported review-comment threads | Read a subagent file only when dispatching that subagent. Keep only its status block in orchestrator state. ## Progressive Loading Map | Need | Load | | ---- | ---- | | Core routing, phase order, dispatch choices | This `SKILL.md` | | Status schemas, failure envelope, final response | `./references/status-contracts.md` | | Report shape and self-check | `./references/report-template.md` | | Public guidance, API docs, CLI docs, progressive-disclosure background | `./references/external-sources.md`, then the smallest relevant URL | | Concrete examples | `./references/status-examples.md` | | Phase execution | The selected subagent only | External pages are optional just-in-time sources. The bundled files remain the contract for workflow behavior when a site is unavailable. ## How This Skill Works Carry only this compact state: ```text Inputs: PR_URL, OUTPUT_FILE, POSTING_MODE, LANGUAGE_STYLE, COMMENT_SCOPE, RESPONDER_LOGIN Latest blocks: COLLECT, ASSESS, DRAFT, VERIFY, WRITE, POST Posting state: not-posted, pending-confirmation, posted, cancelled, failed Open user decisions: comment IDs and focused questions Target taxonomy: review-comment-reply:<root-id>; requires-user-choice:review-summary; requires-user-choice:issue-comment; requires-user-choice:unsupported-review-reply; requires-user-choice:unresolved-metadata Reply disposition: reply-ready; follow-up-ready; skipped-resolved; skipped-already-replied; unsupported-or-needs-user-choice External sources: claim, URL, fetch date, conflict or limitation Collection completeness: paginated sources complete, or explicit limitation recorded ``` Response policy: - Treat review comments as proposals to evaluate, not instructions to accept by default. - Prefer accepting valid feedback with a concrete fix. - Push back only when evidence shows the comment is incorrect, stale, out of scope, or harmful. - Ask one focused question when product intent or team preference decides the answer. - Ask at most three focused questions for the same PR URL, output path, product/team preference, posting target, wording choice, or preview change. - Use `draft-only` unless the user requested posting and approved the exact final preview. - Keep the local report and final `PR_COMMENT_RESPONSE` envelope aligned after posting, cancellation, preview failure, auth failure, or post failure. - Treat resolved review-comment threads as report-only items. - Treat already-replied threads as report-only unless reviewer clarification or new material information warrants a follow-up. - Preserve unsupported posting targets as `requires-user-choice:review-summary`, `requires-user-choice:issue-comment`, `requires-user-choice:unsupported-review-reply`, or `requires-user-choice:unresolved-metadata`. ## Execution Steps 1. Normalize inputs inline. Ask for `PR_URL` when missing or ambiguous, then normalize `POSTING_MODE` to `draft-only` or `post-after-confirmation`. Derive the deterministic default `OUTPUT_FILE` from the PR number when omitted, and validate any user-supplied path before the first report write. Ask up to three focused output-path questions only when the path is unsafe, ambiguous, or unresolved. Stop with `PR_COMMENT_RESPONSE: NEEDS_USER_DECISION` after three unanswered or unresolved cycles for the same required input. 2. Dispatch `review-comment-collector` with normalized inputs. Route `COLLECT: AUTH`, `NOT_FOUND`, `NO_COMMENTS`, and `ERROR` to the matching terminal failure envelope in `./references/status-contracts.md`. Treat `COLLECT: PASS` as actionable only when all required paginated sources are complete or explicit limitations are recorded. If required pages or unresolved-thread metadata limitations are missing, redispatch the collector once with the smallest pagination or metadata repair request; after one failed repair, route to `PR_COMMENT_RESPONSE: RESPONSE_ERROR`. 3. Validate target taxonomy from the collector. Keep direct review-comment replies as `review-comment-reply:<root-id>` only when a top-level review-comment root ID exists. Mark review summaries as `requires-user-choice:review-summary`, issue comments and top-level PR comments as `requires-user-choice:issue-comment`, replies-to-replies or missing root IDs as `requires-user-choice:unsupported-review-reply`, and unavailable unresolved-thread metadata as `requires-user-choice:unresolved-me
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.