pr-improver
O que ela faz
Revisa e corrige as alterações da sua branch atual do git até que a revisão não aponte problemas graves. É para desenvolvedores que querem um pull request limpo antes que outras pessoas o vejam.
Quando usar
- ✓Quando um desenvolvedor quer corrigir achados de revisão em uma branch antes de abrir um pull request.
- ✓Quando um desenvolvedor quer limpar uma branch até que a revisão do pull request passe.
- ✓Quando um desenvolvedor atualiza um pull request existente e quer as correções verificadas antes.
Link da skill
https://github.com/trailofbits/skills/blob/main/plugins/code-improver/skills/pr-improver/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Limpe esta branch até que a revisão do pull request volte sem problemas.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A skill encontra os arquivos alterados e suas pastas, depois executa um ciclo de revisão e correção limitado a essas pastas. Ela mantém um registro dos achados entre as rodadas e informa o resultado.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
Perguntas frequentes
Com qual branch ela compara?
Ela compara com a branch base que você indicar, ou com a branch padrão do repositório se você não indicar nenhuma.
Ela roda na branch principal?
Não. Ela para quando a branch atual é a base, já que não há alterações a melhorar.
Quem faz a revisão?
Uma skill de revisão de pull request instalada faz a revisão. Por padrão, usa a skill review-pr do pr-review-toolkit.
Detalhes
Descrição original do autor
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
Popularidade
- Estrelas no GitHub
- 8,0 mil
- Posição no ranking
- #12670
- Licença
- CC-BY-SA-4.0
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
audit-context-building
8,0 milAjuda seu agente a conhecer uma base de código desconhecida antes de uma revisão de segurança, mapeando o que cada função assume, garante e depende.
algorand-vulnerability-scanner
8,0 milAjuda seu agente a analisar contratos inteligentes da Algorand, escritos em TEAL ou PyTeal, em busca de 11 problemas comuns de segurança, como ataques de rekeying e taxas não verificadas.
audit-prep-assistant
8,0 milAjuda seu agente a preparar uma base de código para uma revisão de segurança externa, com análise estática, cobertura de testes, limpeza de código morto e documentação clara.
cairo-vulnerability-scanner
8,0 milAjuda seu agente a analisar contratos inteligentes em Cairo na StarkNet em busca de 6 problemas graves, incluindo estouro aritmético, mensagens arriscadas entre camadas e replay de assinatura.
Skills parecidas
diffs
394 milPermite que seu agente gere um diff real e compartilhável das edições, como link de visualização ou arquivo de imagem, em vez de um resumo escrito à mão.
coding-agent
394 milAjuda seu agente a passar um trabalho grande de programação para o Codex, Claude Code ou OpenCode em segundo plano e acompanhar o andamento.
gh-issues
394 milAjuda seu agente a encontrar issues do GitHub, escolher quais resolver e abrir pull requests com correções, acompanhando os comentários de revisão.