code-improver

Runs an autonomous review-and-fix loop over a code target using a user-named reviewer.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Iterating on code until it passes review normally requires manually alternating between a reviewer and a fixer, tracking findings across rounds, and knowing when to stop. This Skill automates that loop: it repeatedly runs a reviewer you name, applies fixes, guards scope, and escalates when fixes stop converging.

Core Features & Use Cases

  • Autonomous review-fix loop: Launches a dynamic workflow that reviews, fixes, and re-reviews a target directory until a review reports zero critical/major findings.
  • Cross-round findings ledger: Maintains an on-disk ledger so findings, rejections, and verdicts persist across rounds and across resumed runs after escalation.
  • Scope guards and escalation: Mechanically enforces repo-relative scope globs, detects non-convergence (recurring findings, relocating bugs), and halts with structured violation reports instead of looping forever.
  • Use Case: Point it at a module with target=/repo/src/parser, reviewer plugin-dev:skill-reviewer, and scope src/parser/**; it iterates until the review is clean, then reports rounds used, remaining minor findings, and ledger/metrics paths.

Quick Start

Ask the AI to run an improvement loop over a directory, for example: improve the code in ./src/auth until review passes, using the pr-review-toolkit:review-pr skill as the reviewer with scope src/auth/**.

Frequently Asked Questions about code-improver

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

FAQPage Schema
How do I run an automated code review-and-fix loop?▼

Provide three inputs: the absolute path to the target directory, the name of an installed reviewer agent or skill, and repo-relative scope globs. The Skill launches a background workflow that reviews, fixes, and re-reviews until the review reports zero critical or major findings.

What reviewer does the code improvement loop use?▼

There is no default or bundled reviewer; the user must name an installed agent (e.g. plugin-dev:skill-reviewer) or skill (e.g. pr-review-toolkit:review-pr). If the named reviewer is not installed, the run halts with a reviewer-unavailable result.

When should I use code-improver versus skill-improver or pr-improver?▼

Use code-improver for arbitrary code targets like modules or directories. Use skill-improver when the target is a Claude Code skill, and pr-improver when the target is a branch or pull request, since those entries wire the appropriate reviewer and scope automatically.

What happens when the improvement loop stops converging?▼

The loop escalates and stops when it detects recurring findings, non-decreasing counts, or fixes that relocate problems. It reports the escalation message and finding ids; you then start a fresh run with a decision field, and the on-disk ledger carries all prior findings over.

Does the improvement loop commit changes to git?▼

No, the workflow never commits; all fixes stay in the working tree. It enforces scope globs after every fix round and halts with a violations report if changes fall outside the declared scope.