com um clique
respond-pr-feedback
Respond to review comments on a PR after evaluation and fixes
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Respond to review comments on a PR after evaluation and fixes
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Use when you need a bite-sized, TDD-driven implementation plan but do NOT have a brainstorm-beagle spec to plan against. quick-plan reconstructs intent from the current conversation, fans out domain-expert exploration subagents across the codebase, and synthesizes the same plan format write-plan produces — without requiring `.beagle/concepts/<slug>/spec.md`. Triggers on: "quick plan", "plan this out", "plan what we just discussed", "turn this into an implementation plan", "plan this without a spec", "I don't have a spec, just plan it", "write-plan but no spec". Make sure to use this skill whenever the user wants an implementation or TDD plan and there is no spec to plan against — even if they just say "plan it" after discussing a feature. Writes to `.beagle/plans/<slug>/plan.md`. If a finalized spec already exists at `.beagle/concepts/<slug>/spec.md`, prefer write-plan. Does NOT brainstorm specs, write code, or execute the plan — produces the plan document (and an optional handoff prompt) only.
Use when the user has a fuzzy idea and wants to shape it into a concrete project spec before planning or building. Triggers on: "brainstorm this", "I have an idea for...", "help me think through this project", "what should I build", "spec this out". Also catches vague feature descriptions needing structured questioning to clarify scope. Does NOT write code, plan implementation, review strategy docs, or run strategy interviews — produces a WHAT/WHY spec through dialogue, not a HOW plan.
Use as the follow-up to brainstorm-beagle when a spec has an Open Questions section (or quietly carries latent gaps) that need closing before planning or implementation can begin. Triggers on: "resolve the open questions", "close the gaps in this spec", "research the open items", "finalize my spec", "make this spec implementation-ready", "answer the TBDs". Also triggers whenever the user points at a brainstorm-beagle spec and asks for research, proposals, or answers to unresolved items. Orchestrates parallel research subagents when available (falls back to inline sequential research otherwise), proposes answers one at a time for user approval, then rewrites the spec in place so it arrives at planning with no known gaps. Does NOT write code, design implementation, or create plans — it only produces a complete spec.
Use when you have a finalized brainstorm-beagle spec at `.beagle/concepts/<slug>/spec.md` and need a bite-sized, TDD-driven implementation plan before any code is written. Triggers on: "write a plan", "plan this spec", "turn the spec into a plan", "now plan the implementation", "write-plan". Reads the spec, designs the file structure, decomposes work into 2-5 minute TDD steps with exact paths and commands, self-reviews against the spec, gets user approval, then writes to `.beagle/concepts/<slug>/plan.md` and offers to generate an execution handoff prompt via the subagent-prompt skill. Does NOT brainstorm specs, write code, or execute the plan — produces the plan document (and an optional handoff prompt) only.
Core technical documentation writing principles for voice, tone, structure, and LLM-friendly patterns. Use when writing or reviewing any documentation.
Generate first-draft technical documentation from code analysis
Baseado na classificação ocupacional SOC
| name | respond-pr-feedback |
| description | Respond to review comments on a PR after evaluation and fixes |
| disable-model-invocation | true |
Post replies to review comments after you've evaluated the feedback and made fixes. Resolves conversation threads by default.
Invoke the respond-pr-feedback skill, optionally passing these flags:
respond-pr-feedback [--pr <number>] [--no-resolve]
Flags:
--pr <number> - PR number to target (default: current branch's PR)--no-resolve - Skip thread resolution after posting replies (default: resolve all)Run the fetch-pr-feedback skill first to evaluate the feedback and make any necessary fixes.
Advance only after each pass condition is met (objective checks—not assumed completion).
0; values parsed from gh pr view, gh repo view, and gh api user are non-empty and assigned to $PR_NUMBER, $PR_AUTHOR, $OWNER, $REPO, $CURRENT_USER—never invent owner, repo, or PR number.jq exits 0. If the filtered list is empty, output exactly All review comments have been addressed. and stop (do not call reply or GraphQL resolve APIs).gh api .../replies exits 0 before Step 5 attempts resolution for that item (unless --no-resolve).resolveReviewThread only when Step 3b provides a threadId for that comment’s id; if there is no mapping, skip resolution for that item without treating it as failure.Extract flags from $ARGUMENTS:
--pr <number> or detect from current branch--no-resolve flag (boolean, default false)# Get PR info (if --pr not specified, uses current branch)
gh pr view --json number,author --jq '{number, author: .author.login}'
# Get repo owner/name
gh repo view --json owner,name --jq '{owner: .owner.login, name: .name}'
# Get current authenticated user
gh api user --jq '.login'
Store as $PR_NUMBER, $PR_AUTHOR, $OWNER, $REPO, $CURRENT_USER.
Note: $OWNER, $REPO, etc. are placeholders. Substitute actual values from previous steps.
Fetch review comments, excluding PR author and current user, filtering to root comments that haven't been replied to.
Write the jq filter to a temp file using a heredoc with single-quoted delimiter (prevents shell escaping issues with !=, regex patterns, and angle brackets):
cat > /tmp/unreplied_comments.jq << 'JQEOF'
add // [] |
# Root comments from reviewers (not replies, not PR author, not current user)
[.[] | select(
.in_reply_to_id == null and
.user.login != $pr_author and
.user.login != $current_user
)] as $roots |
# IDs that current user has already replied to
[.[] | select(.user.login == $current_user) | .in_reply_to_id] as $replied |
# Filter to unreplied only
$roots | map(select(. as $c | $replied | index($c.id) == null)) |
# Dedup: group by path + line + reviewer, pick newest per group
group_by({
p: .path,
l: (.line // .original_line),
u: .user.login
}) |
map(sort_by(.created_at) | last) |
# Output needed fields
map({
id,
user: .user.login,
path,
line_display: (
.line as $end | .start_line as $start |
if $start and $start != $end then "\($start)-\($end)"
else "\($end // .original_line)" end
),
body
})
JQEOF
gh api --paginate "repos/$OWNER/$REPO/pulls/$PR_NUMBER/comments" | \
jq -s --arg pr_author "$PR_AUTHOR" --arg current_user "$CURRENT_USER" \
-f /tmp/unreplied_comments.jq
If no unreplied comments found, output: "All review comments have been addressed." and stop.
Fetch review thread IDs to enable resolution after posting replies:
gh api graphql -f query="
query {
repository(owner: \"$OWNER\", name: \"$REPO\") {
pullRequest(number: $PR_NUMBER) {
reviewThreads(first: 100) {
nodes {
id
isResolved
comments(first: 1) {
nodes { databaseId }
}
}
}
}
}
}
"
Build a lookup map: comment databaseId → thread id (unresolved threads only). This enables immediate resolution after posting each reply.
For each unreplied comment, determine the appropriate response based on your evaluation:
| Evaluation Outcome | Response |
|---|---|
| Feedback was incorrect/unfounded | Explain why the current code is correct |
| Feedback lacked context | Explain the design decision |
| Feedback was valid and fixed | "Fixed in $COMMIT_SHA" or brief description of change |
| Feedback was valid but won't fix | Explain the tradeoff/decision |
Tagging guideline: @-tag bot reviewers (e.g., @coderabbitai) to trigger their processing. Do not @-tag human reviewers.
Post reply to each comment:
gh api "repos/$OWNER/$REPO/pulls/$PR_NUMBER/comments/$COMMENT_ID/replies" \
-X POST --raw-field body="$RESPONSE"
This step runs by default. Skip only if --no-resolve was passed.
After posting each reply, look up the $THREAD_ID from the step 3b mapping using the comment's $COMMENT_ID:
gh api graphql -f query="
mutation {
resolveReviewThread(input: {threadId: \"$THREAD_ID\"}) {
thread { isResolved }
}
}
"
$COMMENT_ID has a matching thread ID in the lookup, resolve itGroup by reviewer:
### Reviewer: coderabbitai[bot]
| File:Line | Response Type | Thread |
|-----------|---------------|--------|
| `src/foo.ts:42` | Fixed in `abc1234` | Resolved |
| `src/bar.ts:15` | Explained design | Resolved |
### Reviewer: octocat
| File:Line | Response Type | Thread |
|-----------|---------------|--------|
| `src/baz.ts:7` | Won't fix | Resolved |
Footer:
**Threads resolved: 3/3**
@-tag bot reviewers to trigger re-processing; do not tag human reviewers# Respond to all reviewers on current PR (resolves threads)
respond-pr-feedback
# Respond on a specific PR
respond-pr-feedback --pr 123
# Respond without resolving threads
respond-pr-feedback --no-resolve