fetch-pr-feedback
БесплатноБез исполняемых скриптовНе проверенFetches unresolved PR review comments from GitHub, strips bot noise, formats them by reviewer, and evaluates them using receive-feedback. Use when pulling PR…
от existential-birds★ 92 звезды на GitHubОб этом скилле
Fetch PR Feedback
Fetch review comments from all reviewers on the current PR, format them, and evaluate using the receive-feedback skill. Excludes the PR author and current user by default. Line-specific comments belonging to resolved review threads are also excluded by default.
Usage
Invoke the fetch-pr-feedback skill, optionally passing these flags:
fetch-pr-feedback [--pr <number>] [--include-author] [--include-resolved]
Flags:
--pr <number>- PR number to target (default: current branch's PR)--include-author- Include PR author's own comments (default: excluded)--include-resolved- Include line-specific comments from resolved review threads (default: excluded)
Instructions
Gates (sequence; do not skip)
Advance only after each Pass when is satisfied.
- PR context — Pass when:
$PR_NUMBERis set to a positive integer andgh pr view/gh apifor that PR completed with exit code 0, or you stop in Get PR Context with only the failure given there ("No PR found for current branch…"). - Fetch — Pass when: the resolved-thread GraphQL call (skipped if
--include-resolved) and both paginatedgh api … | jq -s -f …runs (issue comments + review comments) exit 0 and parse as JSON (empty[]is valid). On non-zero exit or jq error, stop; surface command stderr—do not invent comments. - Formatted artifact — Pass when: output is either (a) markdown matching Format Feedback Document (header
# PR #$PR_NUMBER Review Feedback, per-reviewer## Reviewer: …with Summary / Line-Specific sections), or (b) exactly:No review comments found on this PR (excluding PR author, current user, and resolved threads). - Load receive-feedback — Pass when: the receive-feedback skill is loaded; only then run that skill's verify → evaluate → execute loop on that formatted document.
1. Parse Arguments
Accept optional arguments:
--pr <number>or detect from current branch--include-authorflag (boolean, default false)--include-resolvedflag (boolean, default false)
2. Get PR Context
# If --pr <number> was specified, set PR_NUMBER=<number> so gh pr view targets that PR;
# otherwise omit it to get the PR for the current branch:
gh pr view ${PR_NUMBER:+"$PR_NUMBER"} --json number,headRefName,url,author --jq '{number, headRefName, url, 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.
If no PR exists for current branch, fail with: "No PR found for current branch. Use --pr to specify a PR number."
3. Fetch Comments
Fetch both types of comments, excluding $PR_AUTHOR and $CURRENT_USER (unless --include-author is set). Use --paginate with jq -s to combine paginated JSON arrays into one.
Unless --include-resolved is set, first fetch the databaseIds of every review comment that belongs to a resolved review thread. Issue comments (summary/walkthrough) aren't part of review threads, so this only affects line-specific review comments.
Resolved-thread comment IDs (skip this block entirely when --include-resolved is set; set RESOLVED_IDS='[]' instead):
RESOLVED_IDS=$(gh api graphql \
-f owner="$OWNER" -f repo="$REPO" -F pr="$PR_NUMBER" \
-f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 100) {
nodes {
isResolved
comments(first: 100) { nodes { databaseId } }
}
}
}
}
}
' \
--jq '[.data.repository.pullRequest.reviewThreads.nodes[]
| select(.isResolved)
| .comments.nodes[].databaseId
| select(. != null)]')
The first: 100 limits cover typical PRs. For very large PRs (>100 threads or >100 comments in a single thread), thread/comment-level pagination would need to be added; for now, that's a known limitation.
Write jq filters to temporary files using mktemp and heredocs with single-quoted delimiters (prevents shell escaping issues with !=, regex patterns, and angle brackets), then clean them up after running:
Issue comments (summary/walkthrough posts):
ISSUE_JQ=$(mktemp)
cat > "$ISSUE_JQ" << 'JQEOF'
def clean_body:
gsub("<!-- suggestion_start -->.*?<!-- suggestion_end -->"; ""; "s")
| gsub("<!--.*?-->"; ""; "s")
| gsub("<details>\\s*<summary>\\s*🧩 Analysis chain[\\s\\S]*?</details>"; ""; "s")
| gsub("<details>\\s*<summary>\\s*🤖 Prompt for AI Agents[\\s\\S]*?</details>"; ""; "s")
| gsub("<details>\\s*<summary>\\s*📝 Committ
Установить fetch-pr-feedback в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл fetch-pr-feedback?
Fetches unresolved PR review comments from GitHub, strips bot noise, formats them by reviewer, and evaluates them using receive-feedback. Use when pulling PR feedback to triage and fix.
Как установить скилл fetch-pr-feedback?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fetch-pr-feedback запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic