respond-to-pr-comments-in-blocklist

작성자: warpdotdev

PR 리뷰 댓글을 하나씩 차례로 사용자에게 안내하며, 각 댓글에 대한 결정을 수집한 후, 사용자가 미리보기를 승인하면 GitHub에 에이전트가 작성한 답변을 게시하고 리뷰 스레드를 해결합니다. 사용자가 GitHub에서 리뷰 스레드에 답변하거나 해결하려는 경우에만 사용하세요. 사용자가 댓글을 가져오거나 표시만 원하는 경우(‘pr-comments’ 사용) 또는 코드 변경만 수행하고 GitHub에 다시 게시하지 않으려는 경우에는 건너뛰세요.

npx skills add https://github.com/warpdotdev/common-skills --skill respond-to-pr-comments-in-blocklist

Respond to PR comments in blocklist

Use this skill to respond to PR comments on the current branch. If comments are already visible in the conversation, typically from the built-in /pr-comments skill, continue from that context. If comments are not already visible, fetch and display them first, then guide the user through each actionable comment, collect an explicit decision, make requested code changes, and only then ask for approval before posting GitHub replies or resolving review threads.

When not to use this skill

Skip this skill when the user only wants PR comments fetched or displayed (use pr-comments instead) or only wants the underlying code changes made, with no intent to post replies or resolve threads on GitHub. Read this skill only once the user has confirmed they want replies posted or threads resolved.

Preconditions

  • Work in the repository checkout for the PR branch.
  • Do not refetch comments unless the loaded context is missing essential fields such as comment body, author, URL, path, or line metadata.
  • Do not post GitHub replies, submit reviews, or resolve threads until the final preview is approved by the user.

If no PR comments are present in context, fetch and display them before continuing. Prefer invoking the built-in /pr-comments workflow when available. Otherwise use the equivalent GitHub CLI fallback: identify the current PR, fetch PR-level comments, review comments, and review bodies, then display them with insert_code_review_comments. After displaying fetched comments, ask the user whether to continue with this response workflow before making changes.

Comment filtering

Before asking for response mode, filter the loaded comments down to actionable comments that still need the user's attention.

Skip these comments without asking the user about them:

  • Automated PR-level overview or status comments from Warp/Oz/code-review bots, especially comments with no attached file location that summarize review status, check progress, or say no code change is requested.
  • Comments that have already been responded to by the current GitHub user.

To identify the current GitHub user, prefer:

GH_PAGER="" gh api user --jq .login

For review threads, use reply_metadata.parent_comment_id, thread metadata, resolution state, and comment ordering from the loaded context when available. Skip the original comment and thread only when the thread is already resolved or when the latest relevant reply in that thread was authored by the current GitHub user. If a reviewer added a newer follow-up after the current user's reply, keep the thread in the walkthrough. For PR-level comments without explicit thread metadata, skip only when the loaded context clearly shows a current-user response to that specific comment, such as a direct reply, quote, link, or immediately following response that references it.

If an automated or already-answered comment is skipped, keep a short internal skipped list with the comment URL and reason. Do not create decision records for skipped comments, do not include them in the per-comment walkthrough, and do not include them in the final GitHub reply/resolution preview except as a brief skipped-count summary.

When unsure whether a comment is automated, already answered, or still actionable, keep it in the walkthrough rather than skipping it.

Ask User Question requirements

Every ask_user_question call in this skill must include an Other... option that uses the tool's freeform other field. Use that option to let the user enter a custom mode, response, rationale, posting instruction, or next step without returning control in normal chat solely to collect custom text.

Initial mode selection

Before discussing individual comments, call ask_user_question with exactly one mode question:

  • Respond one-by-one
  • Collect all decisions, then address in a batch
  • Other...

Use the selected mode for the rest of the workflow.

One-by-one mode

For each comment, collect the user's decision and immediately perform any requested code change before moving to the next comment. After each change, keep a note of:

  • the comment being addressed
  • what code or documentation changed
  • what validation was run or still needs to run
  • the draft GitHub reply and whether the thread should be resolved

Batch mode

For each comment, interactively collect the user's decision without editing code yet. Batch mode does not batch or skip the information-gathering phase: the user must still be able to ask for more context, request an explanation, inspect the referenced code, or provide a custom approach for any individual comment before deciding. After all comments have a decision, apply the requested code changes in one batch, then validate and prepare the final GitHub reply preview.

Per-comment walkthrough

Process comments in the order they were displayed. For each comment:

  1. Restate the relevant context briefly:
    • author
    • file and line or PR-level location
    • a clickable file reference formatted as path:line for single-line comments or path:start-end for ranged comments when location metadata is available
    • a concise summary of the comment
    • any obvious code context needed to understand it
  2. If the fix is not obvious from the loaded context, inspect the relevant files before presenting options.
  3. Call ask_user_question with options tailored to the specific comment.

When a comment is attached to code, print the file reference before asking the question so the user can quickly open the relevant section. Use repository-relative paths, for example src/lib.rs:42 or src/lib.rs:40-48. For PR-level comments with no file location, state that there is no attached code location.

Always include options with these meanings:

  • Apply the agent's recommended fix for this comment.
  • Explain what this comment means before deciding.
  • Acknowledge the comment but do not make code changes.
  • Other...

Use the Other... option's freeform field for custom responses or approaches. Do not return control to the user in normal chat solely to collect custom freeform text.

When the user selects "explain", provide concise context about the comment, why the reviewer likely raised it, and what tradeoffs are involved. Then ask about the same comment again with updated options; do not skip the decision.

This explanation loop applies in both one-by-one mode and batch mode. In batch mode, only the eventual code edits and GitHub comment updates are deferred; per-comment information gathering remains interactive.

When the user selects "acknowledge without changes", give them the option to provide more information about why no code changes are being made. Preserve any provided rationale for the final GitHub reply draft.

Decision records

Maintain an internal decision record for every comment. Each record should include:

  • comment identifier or URL
  • comment type: review-thread comment, thread reply, PR-level comment, or review body
  • selected disposition: fix, explain-then-fix, acknowledge-without-changes, custom, or no-action
  • planned code change, if any
  • validation needed
  • draft reply body
  • whether to resolve the review thread

For draft replies, be concise and concrete. Prefer replies that say what changed or why the comment is intentionally not addressed. Prefix every draft reply that may be posted to GitHub with [Warp Agent] so reviewers can clearly see the response was agent-authored. If the fix has already been committed and pushed before replies are posted, include a link to the commit that resolved the comment so the response is auditable.

Applying fixes

Follow the user's selected mode:

  • In one-by-one mode, edit and validate each accepted fix before continuing to the next comment.
  • In batch mode, wait until all comment decisions are collected, then make all accepted edits together.

When making changes:

  • Apply only changes related to the selected PR comments.
  • Preserve unrelated local changes.
  • Follow repository-specific coding, testing, and style rules.
  • Run the narrowest useful validation after each one-by-one fix, and run final validation after all fixes are applied.
  • If a requested fix is unsafe, ambiguous, or conflicts with another comment, stop and ask the user before editing.

Final validation

After all accepted fixes are applied:

  1. Review git diff to confirm the changes match the collected decisions.
  2. Run relevant formatting, linting, typechecking, build, or tests based on the repository's conventions and the files changed.
  3. If validation cannot be run, explain why in the final summary and include that caveat in the preview.

Do not commit changes unless the user explicitly asks.

Commit and push before GitHub responses

After validation and before posting any GitHub replies or resolving review threads, ask whether the user wants to commit the changes and push them to origin. This order ensures reviewers see pushed code before they see agent-authored comment responses.

If there are no working tree changes from addressing comments, skip the commit/push question and continue to the GitHub reply preview.

Call ask_user_question with options like:

  • Commit and push these changes to origin before posting replies
  • Do not commit or push; continue to the GitHub reply preview
  • Stop before posting GitHub replies
  • Other...

If the user chooses to commit and push:

  1. Review git status and the final diff so only intended comment-response changes are included.
  2. Ask for or propose a concise commit message if one is not already clear; preserve the Other... option for custom commit instructions.
  3. Stage the intended changes, commit in a non-interactive command, and push the current branch to origin.
  4. Include Co-Authored-By: Warp Agent <agent@warp.dev> in the commit message (never in a PR description), and do not add it again if the commit already has one.
  5. If commit or push fails, stop before posting GitHub replies and report the failure.

GitHub reply and resolution preview

After the commit/push decision is complete, and before posting anything to GitHub, show a preview grouped by comment. For each comment include:

  • comment URL or short identifier
  • action: reply only, resolve only, reply and resolve, or no GitHub action
  • reply body
  • commit link, when a pushed commit exists for the fix
  • validation relevant to that comment

Then call ask_user_question to ask whether to proceed:

  • Post replies and resolve approved threads
  • Edit the draft responses first
  • Do not post anything
  • Other...

If the user chooses to edit, collect their edits, update the preview, and ask for approval again. Do not post until the user selects the approval option.

Posting with GitHub CLI

Use the GitHub CLI only after approval. Clear the pager for all gh commands.

Before running any GitHub CLI command that posts a reply or PR comment, verify the outgoing body begins with [Warp Agent]. If it does not, add the prefix before posting.

For review comments, post replies with the REST API endpoint. Write the reply body to a temporary JSON file and pass it with --input instead of putting the response text directly in command-line arguments:

REPLY_BODY_FILE="$(mktemp)"
cat > "$REPLY_BODY_FILE"
REPLY_PAYLOAD_FILE="$(mktemp)"
python3 - "$REPLY_BODY_FILE" "$REPLY_PAYLOAD_FILE" <<'PY'
import json
import sys
from pathlib import Path

body_file = Path(sys.argv[1])
payload_file = Path(sys.argv[2])
payload_file.write_text(json.dumps({"body": body_file.read_text()}))
PY
GH_PAGER="" gh api \
  --method POST \
  /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies \
  --input "$REPLY_PAYLOAD_FILE"
rm -f "$REPLY_BODY_FILE" "$REPLY_PAYLOAD_FILE"

For PR-level comments or review-body comments that cannot be directly threaded, post a normal PR comment and quote or link to the original comment:

REPLY_BODY_FILE="$(mktemp)"
cat > "$REPLY_BODY_FILE"
GH_PAGER="" gh pr comment {pull_number} --body-file "$REPLY_BODY_FILE"
rm -f "$REPLY_BODY_FILE"

To resolve review threads, use GraphQL. If the thread node ID is not already known, query all review threads for the PR and map loaded comment IDs to their containing thread. Use pagination so threads beyond the first 100 can still be resolved:

GH_PAGER="" gh api graphql --paginate \
  -f owner="{owner}" \
  -f repo="{repo}" \
  -F number={pull_number} \
  -f query='
    query($owner: String!, $repo: String!, $number: Int!, $endCursor: String) {
      repository(owner: $owner, name: $repo) {
        pullRequest(number: $number) {
          reviewThreads(first: 100, after: $endCursor) {
            pageInfo {
              hasNextPage
              endCursor
            }
            nodes {
              id
              isResolved
              comments(first: 100) {
                nodes {
                  databaseId
                  url
                }
              }
            }
          }
        }
      }
    }'

Resolve an approved thread with:

GH_PAGER="" gh api graphql \
  -f threadId="$THREAD_ID" \
  -f query='mutation($threadId: ID!) { resolveReviewThread(input: { threadId: $threadId }) { thread { id isResolved } } }'

If a comment cannot be replied to or resolved through the available metadata, report the limitation and suggest a manual GitHub action instead of guessing.

Final response

After posting approved responses and resolving approved threads, summarize:

  • comments addressed
  • files changed
  • validation results
  • whether changes were committed and pushed to origin
  • GitHub replies or resolutions posted
  • anything left for the user

warpdotdev의 다른 스킬

create-pr
warpdotdev
현재 브랜치를 warp 저장소에 풀 리퀘스트로 생성합니다. 사용자가 PR 열기, 풀 리퀘스트 생성, 리뷰를 위한 변경 제출, 또는 병합을 위한 코드 준비를 언급할 때 사용하세요.
developmentcode-review
research
warpdotdev
시끄러운 조사를 하나 이상의 하위 에이전트에 위임하여 오케스트레이터의 컨텍스트를 깨끗하게 유지한 다음, 정제된 답변을 바탕으로 작업하세요. 답변을 생성하기 위해 많은 파일, 긴 로그, 대규모 diff 또는 광범위한 코드베이스 조사를 읽어야 하는 질문, 즉 답변 자체보다 훨씬 많은 노이즈가 발생하는 질문에 답할 때 이 스킬을 사용하세요. "X는 어떻게 동작하나", "Y는 어디에 사용되나", "Z의 근본 원인은 무엇인가", "이 PR/로그를 요약해 줘" 같은 스타일의 질문에 사용하고, 자유롭게 활용하세요...
suggestion-box
warpdotdev
에이전트가 중대하고 일반화 가능한 마찰에 직면했을 때, 에이전트를 더 효과적으로 만들 수 있는 개선 제안이 있으면 간결하고 건설적인 내부 피드백을 자동으로 제출합니다. 사용자가 호출할 때까지 기다리지 않고 모든 작업 중에 이 스킬을 적극적으로 사용하며, 허락을 요청하거나 메시지를 미리 보여주거나 제출 사실을 언급하지 않고 제출합니다.
complain
warpdotdev
에이전트가 에이전트 도구나 에이전트 작업 경험으로 인해 좌절감을 느낄 때마다 Slack에 간단하고 익명이며 완전히 비구조화된 불만 사항을 자율적으로 던져 넣으세요. 사용자가 호출할 때까지 기다리지 말고 이 스킬을 사전에 사용하고, 에이전트의 원래 목소리를 유지하고, 허가나 미리 보기 없이 제출하며, 제출 사실을 언급하지 마십시오.
council
warpdotdev
모델 다양성을 갖춘 하위 에이전트 위원회를 운영하여 동일한 문제를 여러 관점에서 조사하고, 결과를 비교한 후 최종 권장 사항을 도출합니다. 사용자가 위원회, 추가 의견, 하나의 질문을 평가할 여러 에이전트/모델, 병렬 조사, 레드팀/블루팀 비교, 또는 경쟁 기술 접근법 중 결정을 도와달라고 요청할 때 이 스킬을 사용하세요.
researchcommunicationproject-management
spec-driven-implementation
warpdotdev
구현 전에 PRODUCT.md를 작성하고, 필요시 TECH.md를 작성하며, 구현이 진행됨에 따라 두 문서를 최신 상태로 유지함으로써 주요 기능에 대한 명세 우선 워크플로를 추진합니다. 중요한 기능을 시작할 때, 에이전트 기반 구현을 계획할 때, 또는 사용자가 제품 및 기술 명세를 소스 제어에 포함시키려 할 때 사용하세요.
developmentdocumentproject-management
review-pr
warpdotdev
풀 리퀘스트 diff를 검토하고, 워크플로우가 게시할 수 있도록 구조화된 피드백을 review.json에 작성합니다. 로컬 아티팩트(예: pr_diff.txt, pr_description.txt)에서 체크아웃된 PR을 검토하고, GitHub에 직접 게시하는 대신 기계가 읽을 수 있는 리뷰 출력을 생성할 때 사용합니다.
code-reviewdevelopment
implement-specs
warpdotdev
승인된 PRODUCT.md와 TECH.md의 기능을 구현하며, 구현이 진행됨에 따라 사양과 코드를 동일한 PR에서 일관되게 유지합니다. 제품 및 기술 사양이 승인되고 다음 단계가 기능 구축일 때 사용하세요.
developmentcode-reviewapi