pr-improver

Runs an autonomous review-and-fix loop over branch changes until PR review passes.

6.9k|598|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/trailofbits/skills --skill pr-improver
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-improver
Source: https://github.com/trailofbits/skills/tree/main/plugins/code-improver/skills/pr-improver
Command: npx skills add https://github.com/trailofbits/skills --skill pr-improver

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Iterating on pull request feedback manually is slow and error-prone: you review, fix, re-review, and repeat until the review is clean. This Skill automates that cycle by looping a PR reviewer and a fixer subagent over your branch's changes until the review reports zero critical or major findings.

Core Features & Use Cases

  • Autonomous review-and-fix loop: Launches a dynamic workflow that reviews the branch diff, applies fixes, and re-reviews until convergence, with a configurable round cap.
  • Mechanical scoping: Derives the fix scope from the directories touched by the branch diff, with guards against scope violations and unregistered new files.
  • Escalation and ledger: Detects non-converging loops (recurring findings, relocating problems), escalates for a design decision, and persists a ledger so runs can resume.
  • Use Case: Before opening a pull request, run the loop on your feature branch so review findings are fixed automatically and the branch arrives at review already clean.

Quick Start

Ask the assistant to run the review-and-fix loop on the current branch against main until the PR review comes back clean.

Frequently Asked Questions about pr-improver

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically fix PR review findings on my branch?

Run the review-and-fix loop on your branch: it derives the changed directories from the git diff against the base branch, then loops a PR reviewer and fixer subagent until the review reports zero critical or major findings.

What reviewer does the PR improvement loop use?

By default it uses the review-pr skill from the pr-review-toolkit plugin, which must be installed. You can pass a different reviewer skill or agent with the --reviewer argument, and the loop halts with reviewer-unavailable if none is installed.

Does the review-and-fix loop commit changes to my branch?

No, the loop never commits. All fixes stay in the working tree, and a scope guard protects uncommitted work by snapshotting the tree at loop start and checking scope after every fix round.

What happens when the fix loop does not converge?

The loop stops with an escalation when it detects recurring findings, non-decreasing counts, or fixes that relocate problems. You then make a design decision and start a fresh run with that decision; the on-disk ledger carries over all findings and verdicts.

When should I not use an automated PR fix loop?

Skip it for one-time reviews, where you should run the PR-review skill directly, and for fluid exploratory work where the diff shape is still changing. The loop's value is iteration toward a clean review, not a single pass.