resolve-pr-feedback
Resolve PR Feedback
Process open review discussions in a GitHub pull request. Evaluate each for applicability and objective value. Fix valid feedback locally with conventional commits.
Input
$ARGUMENTS — GitHub PR URL (e.g., https://github.com/owner/repo/pull/123) or PR number for the current repository.
Parse owner, repo, and PR number from the URL. If a bare number, use the current repository context.
Workflow
- Checkout the PR branch
- Fetch all unresolved review threads
- Process each thread sequentially — evaluate, then act
- Report summary
Step 1: Checkout PR Branch
gh pr checkout <number>
Verify the local branch is up to date with the PR head.
Step 2: Fetch Unresolved Review Threads
gh api graphql -f query='
query($owner: String!, $repo: String!, $number: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes {
id
isResolved
isOutdated
path
line
startLine
comments(first: 50) {
nodes {
author { login }
body
createdAt
path
line
startLine
}
}
}
}
}
}
}' -f owner="<owner>" -f repo="<repo>" -F number=<number>
Filter to threads where isResolved is false.
Step 3: Process Each Thread
Evaluate each unresolved thread in order:
3a: Check Applicability
Read the file and lines referenced by the thread. Compare current code against what the reviewer commented on.
| Condition | Action |
|---|---|
| Referenced file no longer exists | Skip. Report: "File deleted — not applicable." |
| Referenced lines substantially changed | Skip. Report: "Code changed — feedback no longer applies." |
isOutdated is true and current code differs from comment context |
Skip. Report: "Outdated — code already modified." |
| Code matches what reviewer commented on | Proceed to value evaluation |
3b: Evaluate Objective Value
| Criterion | Examples |
|---|---|
| Correctness | Bug fix, logic error, off-by-one, null handling |
| Security | Input validation, injection prevention, auth check |
| Performance | N+1 query, unnecessary allocation, missing index |
| Standards compliance | Naming convention, code style, project pattern violation |
| Maintainability | Dead code removal, duplication, unclear naming |
Valuable: Feedback addresses at least one criterion with a concrete, actionable suggestion. Proceed to fix.
Not valuable: Feedback is subjective preference, bikeshedding, or stylistic without project convention backing. Report the specific reason and move to next thread.
3c: Fix and Commit
- Read full file context around the referenced lines
- Implement the fix with minimal, targeted changes
- Stage only the affected file(s)
- Compose a commit message following the Commit Format below
- Run
git commit -m "<message>"(use a HEREDOC for multi-line messages)
Scope each commit to a single discussion thread. Do not batch fixes across threads.
Step 4: Report Summary
| # | File:Line | Feedback | Result |
|---|-----------|----------|--------|
| 1 | src/api/users.ts:42 | Add null check | Fixed (abc1234) |
| 2 | src/utils/parse.ts:15 | Rename variable | Skipped — subjective preference |
| 3 | src/models/order.ts:88 | Fix SQL injection | Fixed (def5678) |
| 4 | src/api/auth.ts:22 | Use different pattern | Not applicable — code changed |
Commit Format
Follow Conventional Commits v1.0.0.
<type>[optional scope]: <description>
[optional body]
| Type | Purpose |
|---|---|
feat |
New feature |
fix |
Bug fix |
refactor |
Neither fix nor feature |
style |
Formatting, whitespace |
perf |
Performance improvement |
docs |
Documentation only |
test |
Adding or updating tests |
chore |
Maintenance tasks |
Description: Imperative mood ("add feature" not "added feature"). Lowercase after prefix. No trailing period. Max 50 characters.
Scope: Optional. Derive from project directory or module names. Omit for cross-cutting changes.
Body: Separate from description with one blank line. Wrap at 72 characters. Explain what and why, not how.
Prohibited: AI attribution, emoji, time estimates, TODO items, file lists, hedging language.
Constraints
- Do not force-push or amend existing commits. Create new commits only.
- Do not resolve threads on GitHub. The PR author decides when to mark discussions resolved.
- Do not modify files outside the scope of the feedback. No drive-by refactoring.
More from jkappers/agent-skills
dotnet-dockerfile
Create optimized, secure multi-stage Dockerfiles for .NET Core and ASP.NET Core applications. Use when (1) creating a new Dockerfile for a .NET project, (2) containerizing a .NET application, (3) optimizing an existing .NET Dockerfile, (4) setting up Docker for .NET 6/7/8+ apps, or (5) user mentions .NET and Docker/container together.
38enhance-prompt
Analyzes and improves LLM prompts and agent instructions for token efficiency, determinism, and clarity. Use when (1) writing a new system prompt, skill, or CLAUDE.md file, (2) reviewing or improving an existing prompt for clarity and efficiency, (3) diagnosing why a prompt produces inconsistent or unexpected results, (4) converting natural language instructions into imperative LLM directives, or (5) evaluating prompt anti-patterns and suggesting fixes. Applies to all LLM platforms (Claude, GPT, Gemini, Llama).
32conventional-commit
Conventional Commits v1.0.0 standards for git messages. Use when (1) creating git commits, (2) writing or drafting commit messages, (3) reviewing commit message format, (4) explaining commit conventions, or (5) validating commit message compliance.
24react-dockerfile
Create optimized, secure multi-stage Dockerfiles for React applications (Vite, CRA, Next.js static). Use when (1) creating a new Dockerfile for a React project, (2) containerizing a React/Vite application, (3) optimizing an existing React Dockerfile, (4) setting up Docker for React with Nginx, or (5) user mentions React and Docker/container together.
23gap-analysis
Product and feature evaluation. Use when (1) Evaluating product/feature feasibility and market viability (2) Assessing product-market fit before investment (3) Comparing opportunities for roadmap prioritization (4) Competitive analysis to identify gaps (5) User asks "should we build X?" or "is this viable?" (6) Risk assessment for product decisions
16skill-creator
Guide for creating effective agent skills following the Agent Skills open standard. This skill should be used when users want to create a new skill (or update an existing skill) that extends agent capabilities with specialized knowledge, workflows, or tool integrations.
16