pr-review-fixer
БесплатноБез исполняемых скриптовНе проверенFetch unresolved change-request review threads (both diff-anchored and CR-level), validate issues, and fix them. Also checks CI status and fixes failing…
от ArjenSchwarz★ 20 звёзд на GitHubОб этом скилле
PR Review Fixer
Fetch unresolved review threads on a change request (CR), validate each issue, create a fix plan, implement fixes, and verify CI checks pass (tests, lint, build).
This skill is forge-aware: the repo may be on GitHub (gh) or GitLab (glab).
It does not hard-code either CLI — it follows the shared operation contract and the
adapter for whichever forge the repo uses.
Forge setup (do this first)
- Read
~/.claude/forge-adapters/CONTRACT.md— it defines the neutral terms (CR, thread, note,<id>) and the operations this workflow calls. - Run
PREFLIGHTto determineFORGEand confirm the CLI is authenticated. If not, stop and tell the user how to authenticate. - Read the matching adapter
~/.claude/forge-adapters/<FORGE>.md. Every concrete command below comes from that adapter's## OPERATIONsection — do not improvisegh/glabcommands.
Workflow
1. Fetch CR and Threads
CR_VIEW → keep `id` and `source_branch`
THREADS_FETCH <id> → normalised array, one element per thread (see CONTRACT.md):
{thread_id, scope, resolved, resolvable, author, path, line, body}
Because THREADS_FETCH returns the same shape on both forges, the rest of this
workflow is identical regardless of forge. Save the array to
/tmp/cr-review-${id}/threads.json.
2. Filter Threads
A thread is a "Claude review" if its body contains the sentinel
<!-- claude-local-review --> (emitted by the local-review agent). On neither
forge is there a bot author — notes post under the invoking user — so the sentinel
is the only reliable signal.
From the normalised array:
- Exclude resolved: drop elements where
resolved == true. - Claude review dedup: when several elements are Claude reviews, keep only the most recent (the adapter already collapsed each thread to its last note; here you dedup across threads if the same review was reposted).
- Bucket by
scope:diff(haspath/line) vscr-level. - Keep only actionable items: requested changes, questions, concrete suggestions. Skip pure acknowledgements, thanks, or informational notes.
3. Determine Working Location
Nothing from this skill is written into the repo. Review reports go out as CR comments.
Working directory: /tmp/cr-review-${id}/. Create it before step 1. Never write
under the repo (no .claude/reviews/, no report files beside the code).
Iteration tracking: count prior overview comments via CR_NOTES_LIST whose body
contains the sentinel <!-- pr-review-overview -->. That count + 1 is the current
iteration N. The sentinel is required because notes post under your own account, so
an author check cannot find prior iterations.
N = (CR_NOTES_LIST <id> | count bodies containing "<!-- pr-review-overview -->") + 1
4. Validate Issues
Diff-anchored threads (scope: "diff"):
- Read the referenced code at
path:line. - Evaluate: is the issue still present? Is the suggestion correct? Does it align
with project conventions (consult the repo's
CLAUDE.md)? - Mark valid or invalid with a brief rationale.
CR-level threads (scope: "cr-level"):
- Parse the body for actionable items.
- Check the feedback still applies to the current CR state.
- Evaluate reasonableness and alignment with project goals.
- Mark valid or invalid; skip pure acknowledgements.
5. Prepare Review Overview
Assemble in-context (not on disk). Step 11 posts the final version — including CI status from step 9 — as a CR comment. Structure:
# CR Review Overview - Iteration [N]
**CR**: [id] | **Branch**: [name] | **Date**: [YYYY-MM-DD]
## Valid Issues
### Diff-Anchored Issues
#### Issue 1: [title]
- **File**: `path:line`
- **Reviewer**: @user
- **Comment**: [quoted]
- **Validation**: [rationale]
### CR-Level Issues
#### Issue 2: [title]
- **Reviewer**: @user
- **Comment**: [quoted]
- **Validation**: [rationale]
## Invalid/Skipped Issues
### Issue A: [title]
- **Location**: `path:line` or CR-level
- **Reason**: [why invalid]
6. Create Task List
Create one task per validated issue with TaskCreate (Fix: <issue>).
7. Fix Issues
Work through the tasks, marking each in progress and complete with TaskUpdate; implement each fix following the project's existing patterns.
8. Check CI Status
CI_STATUS <id> → normalised array of {name, state}
If the array is empty, the CR has no CI configured — skip steps 8–9 entirely and
note "no CI to verify" in the overview. Otherwise handle every element whose state
is failed.
9. Fix CI Issues
For each failed check:
- Get logs:
CI_JOB_LOG <id> <name>. - Reproduce locally using the project's own commands. Prefer a
Makefiletarget if present (make test,make lint), otherwise the command documented in the repo'sCLAUDE.md/README (e.g.pytest,npm test,go test ./...,ruff). - Parse output; p
Установить pr-review-fixer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл pr-review-fixer?
Fetch unresolved change-request review threads (both diff-anchored and CR-level), validate issues, and fix them. Also checks CI status and fixes failing tests, lint errors, and build issues. Works on both GitHub (gh) and GitLab (glab) — it detects the forge from the git remote. Use when reviewing and addressing PR/MR feedback. Filters out resolved threads, keeps only the last Claude review comment per thread (matching the `<!-- claude-local-review -->` sentinel from the local-review agent), validates issues, posts a review report as a CR comment, then fixes validated issues.
Как установить скилл pr-review-fixer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pr-review-fixer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic