# pr-improver

pr-improver runs repeated PR review and fix passes on the current branch until blocking findings are cleared. Use it before opening or updating a pull request.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 995 installs · ★ 7805
- Author: trailofbits
- License: CC-BY-SA-4.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/trailofbits/skills/tree/HEAD/plugins/code-improver/skills/pr-improver/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/pr-improver

## What it does

pr-improver works on the current branch rather than performing a single review. It resolves the base branch, reads the branch diff, and turns the changed files into directory-level scope. That lets related tests added beside modified code stay inside the review area.

The skill starts the `workflows/improve.js` workflow, which sends the changes to an installed PR reviewer and then to a fixer subagent. The default reviewer is `pr-review-toolkit:review-pr`; the cycle records its progress, checks scope after fix rounds, and can stop when it detects escalation or a guard violation. Changes stay in the working tree, and the skill does not create commits.

The standard setup needs the `pr-review-toolkit` plugin, since the loop stops when its reviewer is unavailable. It also relies on the Workflow tool. The run stops when the current branch is the base branch or when the base-to-HEAD diff is empty.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill pr-improver -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/pr-improver/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/pr-improver/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill pr-improver -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/pr-improver/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill pr-improver -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/pr-improver/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install trailofbits/skills pr-improver
```

2. **Manually: put the files in place**
- File: `.github/skills/pr-improver/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill pr-improver -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/trailofbits/skills --path plugins/code-improver/skills/pr-improver
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/pr-improver/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill pr-improver -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/trailofbits/skills/tree/HEAD/plugins/code-improver/skills/pr-improver/SKILL.md

## When to use it
- run a PR review before opening the pull request
- fix reviewer findings across several rounds
- scope checks to directories touched by the branch
- stop unsafe fixes that leave the declared scope

## Example prompts
- Clean up the current branch by fixing PR findings until the review is clear.
- Run the improvement loop against `main` and set `--max-rounds N`.
- Use `pr-review-toolkit:review-pr` to review and fix the current branch.

## Similar
- [improve-codebase-architecture](https://affpapa.org/en/nevibecode/skills/improve-codebase-architecture.md) — skill · 1163035 installs
- [tdd](https://affpapa.org/en/nevibecode/skills/tdd.md) — skill · 1141062 installs
- [triage](https://affpapa.org/en/nevibecode/skills/triage.md) — skill · 990453 installs
- [codebase-design](https://affpapa.org/en/nevibecode/skills/codebase-design.md) — skill · 850344 installs
- [code-review](https://affpapa.org/en/nevibecode/skills/code-review.md) — skill · 789521 installs
- [implement](https://affpapa.org/en/nevibecode/skills/implement.md) — skill · 774700 installs

From the same set: [trailofbits/skills](https://affpapa.org/en/nevibecode/by/trailofbits/skills.md) — 77 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
