con un clic
fixing-pr-comments
// Use when a pull request has unresolved review comments that need to be addressed, or when asked to fix PR feedback
// Use when a pull request has unresolved review comments that need to be addressed, or when asked to fix PR feedback
Generate Stage chapters for the current local git branch and open them in a browser for review.
Use when building or reviewing UI components, pages, or layouts to ensure premium, intentional design that never looks vibe coded
Use when CI is failing on a branch and you need to diagnose failures from GitHub, fix them locally with iterative verification, and re-push clean commits.
Use when a PR is open and the user wants to autonomously monitor and fix PR review comments, CI failures, and rebase conflicts on a recurring loop, or when asked to babysit/iterate on a PR
Use when creating a Linear issue from the current coding context, or when the user invokes /linear-issue. Infers team, priority, status, and relationships from conversation context, working directory, and git branch.
Use when reviewing code changes against AGENTS.md implementation quality standards, or when asked to do an implementation quality review
| name | fixing-pr-comments |
| description | Use when a pull request has unresolved review comments that need to be addressed, or when asked to fix PR feedback |
| metadata | {"internal":true} |
Fetch all unresolved PR threads, triage, fix blockers, resolve the rest.
1. DETECT → PR number/repo from current branch
2. FETCH → Unresolved review threads (GraphQL)
3. TRIAGE → Classify each: FIX / RESOLVE / CLARIFY
4. PRESENT → Show triage table, proceed immediately
5. FIX → Implement → verify → commit → reply → resolve (one commit per fix)
6. PUSH → Push all commits
7. RESPOND → Reply to RESOLVE (+ resolve) and CLARIFY threads
gh pr view --json number,url
# GraphQL required — REST lacks isResolved
# Use --input - to avoid gh's -f flag mangling ! in non-null type annotations
gh api graphql --input - <<'GRAPHQL'
{
"query": "query($owner:String!,$repo:String!,$pr:Int!){repository(owner:$owner,name:$repo){pullRequest(number:$pr){reviewThreads(first:100){nodes{id isResolved path line comments(first:10){nodes{id databaseId body author{login}}}}}}}}",
"variables": {"owner": "OWNER", "repo": "REPO", "pr": NUM}
}
GRAPHQL
Filter to isResolved: false only.
Default to RESOLVE. Only FIX what genuinely blocks merge. Resolve everything else with reasoning. Don't gold-plate — ship it.
| Category | Criteria | Action |
|---|---|---|
| FIX | Bugs, security issues, correctness problems — blocks merge | Implement + commit + resolve |
| RESOLVE | Nits, style, "consider X", minor suggestions, pedantic bot feedback, already addressed | Reply with reasoning + resolve |
| CLARIFY | Ambiguous, needs context | Ask in thread, leave open |
Quality flag during triage: If a comment requests something that violates a principle in the Implementation Quality section of AGENTS.md, categorize it as RESOLVE and cite the specific principle it conflicts with.
Present triage table, then proceed immediately:
| # | File:Line | Summary | Category | Reasoning |
For each FIX:
# Reply (REST — uses databaseId)
gh api repos/{owner}/{repo}/pulls/{pr}/comments/{comment_id}/replies \
-f body="Fixed in <commit_sha>."
# Resolve (GraphQL — REST can't)
gh api graphql --input - <<'GRAPHQL'
{"query": "mutation($id:ID!){resolveReviewThread(input:{threadId:$id}){thread{isResolved}}}","variables": {"id": "THREAD_NODE_ID"}}
GRAPHQL
Then git push.
| Mistake | Fix |
|---|---|
| Fixing before triaging | Triage everything first |
| Fixing nits | RESOLVE with reasoning |
| Accepting quality-violating feedback | RESOLVE comments that conflict with Implementation Quality principles in AGENTS.md |
| Introducing quality violations in fixes | Run quality gate before committing |
| Performative replies ("Great catch!") | State what changed or why not |
| One big commit | One commit per fix |
| Skipping verification | Verify before committing |
| Implementing unclear feedback | CLARIFY, ask first |
| Using REST for resolve | GraphQL required |
| Mixing up ID types | databaseId for REST, id (node ID) for GraphQL |
| RESOLVE without explanation | Always explain |
| Fixing only the flagged line | Search for same pattern, fix all |