skills/pr-address-feedback/SKILL.md
Use this skill whenever the user wants to address, respond to, work through, or handle GitHub PR review comments — including code review feedback, reviewer suggestions, bot comments, or requested changes — even if they don't say "address". Handles the full end-to-end workflow: fetch threads, plan fixes, commit, push, and reply. Requires `gh` CLI.
npx skillsauth add robdefeo/agent-skills pr-address-feedbackInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
fix, doc-only, skip, or defer.Get PR metadata:
gh pr view --json number,title,headRefName,baseRefName,url,author
Fetch review threads (with resolution state, author, body, location):
gh api graphql -f query='
query($owner:String!,$repo:String!,$pr:Int!){
repository(owner:$owner,name:$repo){
pullRequest(number:$pr){
reviewThreads(first:100){
nodes{
id isResolved isOutdated
comments(first:50){
nodes{ id databaseId author{login} body path line originalLine url createdAt }
}
}
}
}
}
}' -F owner=OWNER -F repo=REPO -F pr=PR_NUMBER
After fetching, filter to unresolved threads only (isResolved == false) before evaluation. Threads with isOutdated == true should be flagged [outdated] and defaulted to skip.
Known limit:
reviewThreads(first:100)andcomments(first:50)do not paginate. PRs with more than 100 threads or 50 comments per thread will be silently truncated.
Fetch general PR comments:
gh api repos/OWNER/REPO/issues/PR_NUMBER/comments
Filter noise. Drop bodies matching known boilerplate before evaluating:
thank you for your contributionreviewing this pull request and will post my feedback shortlynot currently linked to an issueAssign one of four dispositions:
| Disposition | When to use | |-------------|-------------| | fix | Clear code change, low risk, in scope. | | doc-only | Only comments/docstrings/README change — no logic touched. | | skip | Design intent, disagreement with premise, or invalid suggestion. Always give a reason. | | defer | Valid but out of scope for this PR. Will become a follow-up issue. |
Flag outdated inline comments (line no longer exists in the diff) as [outdated] in the Notes column; default disposition skip with reason "comment refers to code no longer in this diff".
Present one concise table. Do not touch code yet.
| # | File:line | Author | Disposition | Notes |
|---|-----------|--------|-------------|-------|
| 1 | src/foo.rs:42 | @alice | fix | Use try_init() instead of init() |
| 2 | tests/bar.rs:16 | @bob | fix | Replace /tmp with tempfile::tempdir() |
| 3 | src/foo.rs:96 | @alice | skip | Unbounded channel is intentional — must not block agent loop |
| 4 | src/db.rs:120 | @coderabbit | defer | Add connection pooling — larger refactor, separate PR |
| 5 | README.md:8 | @bob | doc-only | Clarify install prerequisites |
Wait for approval. The user edits by row number — e.g. 2 skip: flaky on CI, 5 defer. Update the table and re-confirm before proceeding.
Group related changes into logical units. Canonical groups:
docs — doc strings, comments, README/markdown fixestests — test portability, coverage, cleanupapi — public signature, return type, parameter changeserror-handling — logging, error propagation, retryrefactor — internal restructuring with no behavior changeDo not mix unrelated concerns in a single commit. Many small comments on the same concern → one commit. Two fixes in different concerns → two commits.
Conventional Commits: type(scope): subject
Capture the full 40-character commit hash with git rev-parse HEAD (not --short). Replies in Step 6 must use the full hash so the link stays stable even if GitHub's short-hash collision threshold shifts.
git add crates/tracer/src/lib.rs
git commit -m "docs(tracer): clarify async write and flush guarantees"
HASH_DOCS=$(git rev-parse HEAD)
git add crates/tracer/tests/
git commit -m "test(tracer): replace /tmp with tempfile::tempdir()"
HASH_TESTS=$(git rev-parse HEAD)
git add crates/tracer/src/lib.rs
git commit -m "fix(tracer): use try_init() and log on dropped send"
HASH_API=$(git rev-parse HEAD)
git push
Record a comment_id → hash map as you commit. Used in Step 6.
These run in order. Do not start 6b until 6a is complete for every defer row — a deferred reply without a real issue URL is invalid.
For every defer row, create the issue first and capture its URL. Build a comment_id → issue_url map alongside the comment_id → hash map from Step 5.
ISSUE_URL=$(gh issue create \
--title "Add connection pooling to db layer" \
--body "Follow-up from #PR_NUMBER (thread: COMMENT_URL).\n\nContext: reviewer flagged missing pooling in src/db.rs:120. Out of scope for the current PR — tracking here." \
| tail -1)
If gh issue create fails or returns no URL, stop — do not post the deferred reply with a placeholder.
Reply templates — {hash} is the full 40-character commit SHA from Step 5; {issue_url} is the URL captured in 6a:
Fixed in {hash} — {one-line description of what changed}.Clarified in {hash} — {what was clarified}.Won't fix — {concise reason rooted in design intent or scope}.Out of scope for this PR — tracked in {issue_url}. — {issue_url} is required and must be a real GitHub issue URL from 6a. Never substitute a phrase like "tracked for follow-up" or "will address later".Post replies (inline review threads):
gh api repos/OWNER/REPO/pulls/PR_NUMBER/comments/COMMENT_ID/replies \
-X POST --field body="Fixed in $HASH_API — switched to try_init() and added a warn! on dropped send."
Note:
COMMENT_IDmust be the numeric REST API ID — use thedatabaseIdfield from the GraphQL response, not the nodeid(e.g.PRRC_kwDO…).
Post replies (general PR comments — no thread; post a new top-level comment):
gh api repos/OWNER/REPO/issues/PR_NUMBER/comments \
-X POST --field body="Fixed in $HASH — {one-line description}."
Reply to every evaluated thread — no comment should be left without a response.
Resolve threads for fix, doc-only, and defer. Leave skip threads open so the reviewer can push back.
gh api graphql -f query='
mutation($id:ID!){
resolveReviewThread(input:{threadId:$id}){ thread{ isResolved } }
}' -F id=THREAD_ID
[outdated] tag in plan, default skip.tools
Use this skill whenever the user wants to create, open, or raise a new GitHub pull request from the current branch — including phrasings like "open a PR", "raise a PR", "make a PR", "ship this". Drafts a Conventional Commits title and a Summary body that explains *why* and *what*, respects `.github/pull_request_template.md` when present, auto-links referenced issues, waits for approval, then pushes and opens the PR. Assumes commits already exist. Requires `gh` CLI.
data-ai
Use this skill when the user wants to organize, classify, or maintain a PARA-method second brain. Triggers include asking where to file something, distinguishing projects from areas, processing an inbox, setting up a new project, completing or archiving a project, running a monthly review, validating system structure, or finding stale/orphaned content.
development
Use this skill to classify, scope, split, draft, and review documentation with the Diataxis framework. Triggers include choosing tutorial/how-to/reference/explanation mode, resolving mixed-mode pages, rewriting docs into a target mode, and validating drafts with a checklist.
development
Guide the Amazon Working Backwards process from the 5 Questions through to a full PR-FAQ document. Use when the user wants to (1) draft answers to the Amazon 5 Questions for a proposal or idea, (2) refine or critique existing 5Q answers, (3) verify and challenge 5Q answers with probing questions, (4) generate a PR-FAQ document from 5Q answers, (5) review or critique an existing PR-FAQ against Amazon standards, or (6) clarify any element of the 5Q or PR-FAQ process. Triggers include mentions of "5 questions," "PR-FAQ," "PRFAQ," "working backwards," "press release FAQ," Amazon-style proposals, or requests to write/review product proposals in Amazon format.