pr-improver
Что он делает
Проверяет и исправляет изменения в текущей ветке git, пока обзор не покажет отсутствие серьезных проблем. Он нужен разработчикам, которые хотят привести запрос на слияние в порядок до того, как его увидят другие.
Когда использовать
- ✓Когда разработчик хочет исправить замечания проверки в ветке до открытия запроса на слияние.
- ✓Когда разработчик хочет довести ветку до прохождения проверки запроса на слияние.
- ✓Когда разработчик обновляет существующий запрос на слияние и хочет сначала проверить исправления.
Ссылка на скилл
https://github.com/trailofbits/skills/blob/main/plugins/code-improver/skills/pr-improver/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Приведи эту ветку в порядок, пока обзор запроса на слияние не станет чистым.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Скилл находит измененные файлы и их папки, затем запускает цикл проверки и исправления, ограниченный этими папками. Он ведет журнал замечаний по раундам и сообщает итог.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
PR Improver
Improve the current branch by running /code-improver:improve — a dynamic workflow that
loops a PR reviewer and a fixer subagent over the branch's changes until a review
reports zero critical/major findings. The loop, its ledger, and its guards live in the
workflow; this skill derives the scope from the branch diff and relays the outcome.
Starting the loop
The user provided: $ARGUMENTS (if empty, take base branch and preferences from the
conversation).
1. Resolve the branch and its change surface
- Repo root:
git rev-parse --show-toplevel. Fail loudly outside a repository. - Base: the argument if given, else the repository's default branch
(
git symbolic-ref refs/remotes/origin/HEAD→ its short name, falling back tomain). Refuse to run when the current branch IS the base — there is no diff to improve. - Changed files:
git diff --name-only <base>...HEAD. If empty, say so and stop. - Scope: the changed files' directories, widened — per-file globs are too tight
(PR fixes legitimately add tests next to changed code). Map each changed file to its
repo-relative directory glob
<dir>/**(**at the repo root only if files at the root changed), then deduplicate and drop globs covered by another.
2. Resolve the loop script
Resolve improve.js from this SKILL.md's installed location
to an absolute path and confirm the file exists. Its plugin directory is pluginRoot.
Use this exact plugin copy; if the file is missing, stop.
3. Invoke the workflow
Run it with the Workflow tool, {scriptPath: "<the path from step 2>", args: {...}}:
{
"target": "<repo root>",
"reviewer": {
"kind": "skill",
"name": "pr-review-toolkit:review-pr",
"notes": "Review the working tree's changes against <base> as a pull request: correctness, tests, error handling, and the review dimensions the skill prescribes."
},
"scope": ["<derived-dir-glob>/**"],
"pluginRoot": "<the plugin directory from step 2>",
"maxRounds": 5
}
reviewer— the default above requires thepr-review-toolkitplugin. When the user names a different PR reviewer (skill or agent), use it, with kind set accordingly.maxRoundsonly if the user asked for a different cap.pluginRootis the resolved plugin directory from step 2, for the metrics collector.finalizedefaults are right for PRs: no version bump unless the branch sits inside a plugin, narration strip and docs pass on.decisiononly on continuation (below).
The loop's baseline snapshot is the tree at loop start — its scope guard protects the branch's uncommitted work; the PR's own commits are what the reviewer reviews.
The workflow runs in the background and needs no babysitting: it reviews, fixes, re-reviews, checks scope after every fix round, and can only complete on a clean review. It never commits; all changes stay in the working tree.
If the Workflow tool is unavailable or denied, stop and say so. Do not improvise the loop inline with direct edits — the ledger, scope guard, and escalation guarantees live in the workflow, and an inline imitation has none of them.
If the result is halted: "reviewer-unavailable", relay it and stop. The reviewer
is not installed in this session; tell the user which plugin provides it (the default
needs pr-review-toolkit) and re-run after installing. Do not review the branch
yourself.
Do not end your turn while the loop is running. The Workflow tool returns a task id immediately; the result comes later. In an interactive session the completion notification re-invokes you — wait for it. In a non-interactive run (scripted, CI, eval) there is no later turn: stopping abandons the loop mid-round, so after launching, poll the task (TaskOutput with the returned task id, or sleep-and-recheck) until it completes, then relay the result. A session that answers "the loop is running, I'll report later" has lost the run.
Relaying the result
The workflow returns a structured result. Report it honestly — the distinctions matter:
converged: true— the last action was a review with zero critical/major findings. Report rounds used, remaining minor findings (open_minor_count), and the artifact paths (ledger_path,metrics).capped: true— the fix budget ran out and the FINAL review still found blocking issues. Say plainly: capped, NOT converged, and listopen_blocking. Do not present thi
Частые вопросы
С какой веткой он сравнивает?
Он сравнивает с базовой веткой, которую вы укажете, или с веткой по умолчанию в репозитории, если вы ее не указали.
Будет ли он работать в главной ветке?
Нет. Он останавливается, если текущая ветка совпадает с базовой, так как изменений для улучшения нет.
Кто делает проверку?
Проверку делает установленный скилл обзора запросов на слияние. По умолчанию это скилл review-pr из pr-review-toolkit.
Подробности
Оригинальное описание автора
Runs an autonomous review-and-fix improvement loop over the current branch's changes until a PR review comes back clean, scoped mechanically to the directories the branch touched. Reviews are performed by an installed PR-review skill (default: pr-review-toolkit's review-pr). Use to fix review findings on a branch before opening or updating a pull request ('clean up this branch', 'fix this PR until review passes', 'run review-and-fix on my changes'). NOT for a one-time review — run the PR-review skill directly.
repo: trailofbits/skills
Популярность
- Звёзды на GitHub
- 8.0k
- Место в рейтинге
- #12670
- Лицензия
- CC-BY-SA-4.0
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
audit-context-building
8.0kПомогает агенту изучить незнакомый код перед проверкой безопасности: как устроена каждая функция, что она предполагает, гарантирует и от чего зависит.
algorand-vulnerability-scanner
8.0kПомогает агенту проверить смарт-контракты Algorand на TEAL или PyTeal на 11 типичных проблем безопасности, например на rekeying и комиссии без проверки.
audit-prep-assistant
8.0kПомогает агенту подготовить код к внешней проверке безопасности: статический анализ, покрытие тестами, удаление мертвого кода и понятная документация.
cairo-vulnerability-scanner
8.0kПомогает агенту проверить смарт-контракты Cairo в StarkNet на 6 серьезных проблем: переполнение, рискованные сообщения между уровнями и повтор подписи.
Похожие скиллы
diffs
394kПозволяет агенту создать настоящее сравнение правок в виде ссылки или файла изображения, которым можно поделиться, вместо ручной сводки.
coding-agent
394kПомогает агенту передать большую задачу по коду в Codex, Claude Code или OpenCode как фоновому исполнителю, а затем проверять ее ход.
gh-issues
394kПомогает агенту находить задачи GitHub, выбирать, над какими работать, и открывать запросы на слияние с исправлениями, включая ответы на комментарии рецензентов.