reply
This skill should be used when the user asks to "reply to PR comments", "respond to review comments", "reply to PR
What this skill does
# GitHub PR Comment Replier
Reply to comments on a GitHub pull request by finding threads that need responses, generating thoughtful replies based on codebase context, and posting them directly.
**Filter criteria for actionable threads:**
- Thread is **not resolved**
- Latest comment was **not generated by this skill** (detected by "github-devflow:reply" signature)
## Helper Scripts
This skill uses shared helper scripts in `scripts/` at the plugin root:
| Script | Purpose |
|--------|---------|
| `fetch-review-threads.sh` | Fetch review threads from a PR with optional filtering |
| `post-reply.sh` | Post a reply to a review thread |
## Workflow
### Step 1: Fetch Actionable Threads
Use the helper script to fetch review threads that need replies:
```bash
PR_NUMBER=$ARGUMENTS
bash ${CLAUDE_PLUGIN_ROOT}/scripts/fetch-review-threads.sh $PR_NUMBER --filter-resolved --filter-skill reply
```
This returns JSON with:
- `owner`, `repo`, `prNumber`: Repository context
- `threads`: Array of threads requiring action
- `totalCount`: Number of actionable threads
Each thread contains:
- `id`: Thread ID for posting replies (e.g., `PRRT_xxx`)
- `isResolved`: Always `false` (filtered)
- `path`: File path in the repository
- `line`: Line number in the file
- `comments.nodes`: Array of all comments in the thread (latest comment is last)
If no actionable threads are found (`totalCount: 0`), report that no replies are needed.
### Step 2: Analyze and Generate Replies
For each actionable thread:
1. **Read all comments**: Parse the entire `comments.nodes` array to understand the full conversation context
2. **Examine the code context**: Read the file at `path` around `line`
3. **Analyze the codebase**: Use Grep and Glob to understand related code and patterns
4. **Generate a thoughtful reply**: Address the reviewer's concern with specifics
When generating replies:
- Be concise but thorough
- Reference specific code when relevant
- Acknowledge valid points
- Suggest changes or improvements (but do NOT modify any files)
- If suggesting a fix, explain what should be changed and why
### Step 3: Post Replies
Post each reply using the helper script:
```bash
bash ${CLAUDE_PLUGIN_ROOT}/scripts/post-reply.sh --skill reply "<thread-id>" "<reply-body>"
```
Or for longer replies, write to a file first:
```bash
mkdir -p /tmp/github-devflow:reply/${REPO}/${PR_NUMBER}
# Write reply body to /tmp/github-devflow:reply/${REPO}/${PR_NUMBER}/reply.md
bash ${CLAUDE_PLUGIN_ROOT}/scripts/post-reply.sh --skill reply --file "<thread-id>" /tmp/github-devflow:reply/${REPO}/${PR_NUMBER}/reply.md
```
The script returns JSON with:
- `success`: Boolean indicating success
- `comment.id`: The created comment's ID
- `comment.url`: URL to the comment
### Step 4: Report Summary
After processing all threads, provide a summary:
- Number of threads processed
- Number of replies posted
- Any errors encountered
## Important Guidelines
### No Code Changes
**This skill must NOT modify any repository files.** Only suggest changes in replies:
- Do NOT use Edit tools
- Do NOT create or modify any repository files
- Only read files for context and analysis
- Suggest code changes in the reply text, not by editing files
- The Write tool is permitted ONLY for creating temp files under `/tmp/github-devflow:reply/` for the reply posting process
### Reply Quality
- Address the specific concern raised in the comment
- Provide context from the codebase when relevant
- Be professional and collaborative
- Keep replies focused and actionable
### Codebase Analysis
- Read the file mentioned in the thread's `path` field
- Look at surrounding code for context
- Check for related patterns elsewhere in the codebase
- Consider the reviewer's perspective
### Error Handling
- If `gh` CLI is not authenticated, inform the user to run `gh auth login`
- If the PR number is invalid, report the error clearly
- If no actionable threads are found, report that no replies are needed
- If posting a reply fails, report the error and continue with remaining threads
## Script Reference
### fetch-review-threads.sh
```
Usage: fetch-review-threads.sh <pr-number> [--filter-resolved] [--filter-skill <name>]
Options:
--filter-resolved Filter out resolved threads
--filter-skill <name> Filter out threads where the latest
comment contains the specified skill's signature
(github-devflow:<name>)
Output: JSON with repository info and thread array
```
### post-reply.sh
```
Usage: post-reply.sh [--skill <name>] <thread-id> <body>
post-reply.sh [--skill <name>] --file <thread-id> <body-file>
Options:
--skill <name> Include skill identifier in signature
(e.g., --skill reply → "github-devflow:reply")
Arguments:
thread-id The GraphQL ID of the review thread (e.g., PRRT_xxx)
body The reply message text
body-file Path to a file containing the reply message
Note: Automatically appends a "Claude Code" signature to identify
AI-generated replies for filtering in subsequent runs.
Output: JSON with success status and comment details
```
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.