address-comments
БесплатноБез исполняемых скриптовНе проверенWalk every unresolved review thread on a PR, triage each one, reply with a rationale of whether or not the comment will be acted upon, make the code change if…
от drn★ 23 звезды на GitHubОб этом скилле
Arguments
$ARGUMENTS— Optional. PR number, PR URL, or branch name. Defaults to the PR for the current branch.
Context
- Current branch: !
git branch --show-current - Git status: !
git status --short - Base ref: !
git branch -r 2>/dev/null | grep -oE 'origin/(main|master)' | head -1 - Default remote: !
git remote 2>/dev/null | head -5
Your task
Walk every unresolved review thread on the target PR. For each thread: read the comment in context, decide whether to act on it, make the code change if warranted, post a reply explaining the rationale, then resolve the thread. End with a clean PR (zero unresolved threads) and a one-paragraph summary of what was done.
This skill does not push the branch into CI babysitting or merge it — use /pr or /merge for that. The focused job here is comment hygiene.
Step 1: Identify the PR
First, derive the upstream repo slug. Prefer the upstream remote if it exists, otherwise origin. The rules below all need it.
REPO_SLUG=$(git remote get-url upstream 2>/dev/null | sed -E 's|.*[:/]([^/]+/[^/.]+)(\.git)?$|\1|')
[ -z "$REPO_SLUG" ] && REPO_SLUG=$(git remote get-url origin | sed -E 's|.*[:/]([^/]+/[^/.]+)(\.git)?$|\1|')
Then determine the target PR by applying these rules in order:
$ARGUMENTSis a GitHub PR URL (https://github.com/<owner>/<repo>/pull/<n>) → parse owner/repo/number from the URL.$ARGUMENTSmatches^[0-9]+$(pure digits) → rungh pr view <args> --repo "$REPO_SLUG" --json numberto verify it is a real PR. If that succeeds, treat as a PR number. If it fails, fall through to the branch-name rule (a branch literally named42should still resolve correctly).$ARGUMENTSis any other non-empty string → treat as a branch name and look up the PR for that branch.$ARGUMENTSis empty → use the current branch (git branch --show-current).
Find the PR number with gh pr list --repo <slug> --head '<branch>' --state open --json number,url.
Cross-fork PRs. If gh pr list --head '<branch>' returns zero results AND an upstream remote exists, the branch may live on a fork. Resolve the fork owner from the origin remote and retry with the qualified --head '<fork-owner>:<branch>':
FORK_OWNER=$(git remote get-url origin | sed -E 's|.*[:/]([^/]+)/[^/.]+(\.git)?$|\1|')
gh pr list --repo "$REPO_SLUG" --head "$FORK_OWNER:<branch>" --state open --json number,url
If no open PR is found after both attempts, stop and tell the user: No open PR found for <branch>. Open one with /pr first. Do not try to open one — that is /pr's job.
Step 2: Fetch every unresolved review thread
Use the GraphQL API to get all threads in one shot — REST does not expose isResolved. The first: 100 page size is GitHub's connection maximum; pagination handles PRs larger than that (see below). The first: 50 comment window per thread is generous enough for the idempotency-guard scan in Step 3(b) on normal threads. Two ID fields matter here and they are easy to confuse:
reviewThreads.nodes[].idis the thread node ID (an opaque string). Used by theresolveReviewThreadmutation in Step 3(f).reviewThreads.nodes[].comments.nodes[].databaseIdis the comment integer ID (REST-style). Used by the reply endpoint in Step 3(e).
Do not swap them — the URL in Step 3(e) takes the comment's databaseId, not the thread's id.
gh api graphql -F owner=<owner> -F repo=<repo> -F number=<n> -f query='
query($owner: String!, $repo: String!, $number: Int!, $after: String) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $number) {
reviewThreads(first: 100, after: $after) {
pageInfo { hasNextPage endCursor }
nodes {
id
isResolved
isOutdated
path
line
comments(first: 50) {
nodes {
databaseId
body
author { login }
path
line
originalLine
diffHunk
}
}
}
}
}
}
}'
Filter to threads where isResolved == false. If there are zero, stop and report: No unresolved review threads on PR #<n>.
Pagination. If pageInfo.hasNextPage is true, the PR has more than 100 review threads. Re-issue the same query with -F after=<endCursor> (the $after variable is already declared in the signature above) and concatenate the pages before continuing. PRs with very large bot-comment volumes (e.g. a CodeRabbit pass on a sweeping refactor) hit this case; do not silently process only the first page.
Step 3: Triage and act on each thread
For each unresolved thread, work through it in this order. Do not parallelize — review threads can suggest conflicting edits to the same lines, and you need to apply them sequentially with the latest file state in mind.
(a) Read the code in context. Open `
Установить address-comments в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadEditBash(gh api:*)Bash(gh pr:*)Bash(git add:*)Bash(git commit:*)Bash(git push:*)Bash(git status:*)Bash(git remote:*)Bash(git branch:*)Bash(git rev-parse:*)Bash(git diff:*)Bash(git log:*)FAQ
Что делает скилл address-comments?
Walk every unresolved review thread on a PR, triage each one, reply with a rationale of whether or not the comment will be acted upon, make the code change if warranted, and mark the thread resolved. Use when the user asks to address only the open PR comments without re-running CI, respond to review feedback, resolve review threads, or clear bot comments on a PR.
Как установить скилл address-comments?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл address-comments запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic