code-improver
Ce qu’il fait
Relit et corrige sans cesse un morceau de code avec un relecteur que vous désignez, et s'arrête lorsque les problèmes graves ont disparu. Il s'adresse aux développeurs qui veulent améliorer leur code par cycles de relecture répétés.
Quand l’utiliser
- ✓Quand un développeur veut améliorer du code jusqu'à ce qu'une relecture ne signale plus de problème critique ou majeur.
- ✓Quand un développeur veut lancer une boucle d'amélioration avec un skill ou un agent relecteur précis.
- ✓Quand un développeur veut itérer sur un module jusqu'à ce que sa relecture soit validée.
Lien du skill
https://github.com/trailofbits/skills/blob/main/plugins/code-improver/skills/code-improver/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Améliore le code de mon dossier utils jusqu'à ce que l'agent relecteur que j'ai choisi ne trouve plus rien de grave.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
Le skill demande le dossier cible, le relecteur à utiliser et les fichiers qu'il peut modifier. Il lance ensuite une boucle où le relecteur examine le code et un correcteur applique les changements, en tenant à jour une liste des constats.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
Code Improver
Improve any code target by running /code-improver:improve — a dynamic workflow that
loops the named reviewer and a fixer subagent until a review reports zero critical/major
findings, then strips its own residue. The loop, its ledger, and its guards live in the
workflow; this skill collects the three inputs the generic entry requires and relays the
outcome.
Starting the loop
The user provided: $ARGUMENTS (if empty, take the details from the conversation).
1. Collect the three required inputs — no guessing
- Target: the absolute path to the directory under improvement. Resolve relative paths against the working directory; verify the directory exists.
- Reviewer: the installed skill or agent that performs every review. The user must
name it — there is no default and no bundled reviewer. Determine the kind:
- a namespaced agent (e.g.
plugin-dev:skill-reviewer) →"kind": "agent" - an installed skill (e.g.
pr-review-toolkit:review-pr) →"kind": "skill"If the name could be either, check the session's skill listing; if still ambiguous, ask the user. If no reviewer was named, ask — do not pick one.
- a namespaced agent (e.g.
- Scope: repo-relative globs the loop may touch. The generic entry requires it
explicitly; if the user did not give one, propose the target directory
(
<repo-relative-target>/**) and confirm before launching.
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": "<absolute target path>",
"reviewer": { "kind": "agent|skill", "name": "<namespaced-name>", "notes": "<what the reviewer should know about the target>" },
"scope": ["<repo-relative-glob>/**"],
"pluginRoot": "<the plugin directory from step 2>",
"maxRounds": 5
}
maxRoundsonly if the user asked for a different cap.pluginRootis the resolved plugin directory from step 2, for the metrics collector.finalize({"version_bump": bool, "narration_strip": bool, "docs_pass": bool}) only to override the defaults: version bump when the target sits inside a plugin, narration strip and docs pass always.decisiononly on continuation (below).
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 named
reviewer is not installed in this session; tell the user which plugin provides it and
re-run after installing. Do not review the target 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 this as success.escalation— the loop detected it was not converging (recurring findings, non-decreasing counts, or a fix relocating a problem). Relay the escalation message and finding ids to the user: this needs a design decision, not more rounds.halted— a gu
Questions fréquentes
Choisit-il le relecteur à ma place ?
Non. Il vous demande de nommer le relecteur, car il n'y a pas de valeur par défaut.
Qu'est-ce qui empêche la boucle de trop modifier le code ?
Une garde de périmètre limite les fichiers que la boucle peut modifier.
Que se passe-t-il si les corrections n'améliorent plus le code ?
La boucle fait remonter le problème au lieu de tourner sans fin, pour que vous décidiez de la suite.
Détails
Description originale de l’auteur
Runs an autonomous review-and-fix improvement loop over any code target — a skill, plugin, module, or directory — using a reviewer the user names: any installed skill or agent. Keeps a cross-round findings ledger, escalates when fixes stop converging, and guards scope mechanically. Use when asked to 'improve this code until review passes', 'run an improvement loop with <reviewer>', or to iterate review-and-fix with a specific reviewer. For skills prefer the skill-improver entry; for a branch prefer pr-improver.
repo: trailofbits/skills
Popularité
- Étoiles GitHub
- 8.0k
- Position au classement
- #12669
- Licence
- CC-BY-SA-4.0
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
audit-context-building
8.0kAide votre agent à comprendre un code inconnu avant une revue de sécurité, en cartographiant ce que chaque fonction suppose, garantit et utilise.
algorand-vulnerability-scanner
8.0kAide votre agent à scanner des contrats Algorand (TEAL, PyTeal) pour 11 failles courantes, comme la réaffectation de clé ou les frais non contrôlés.
audit-prep-assistant
8.0kAide votre agent à préparer votre code pour une revue de sécurité externe, avec analyse statique, couverture de tests, nettoyage du code mort et documentation claire.
cairo-vulnerability-scanner
8.0kAide votre agent à scanner les contrats Cairo sur StarkNet pour 6 problèmes graves, comme les dépassements arithmétiques et le rejeu de signature.
Skills similaires
add-model-provider
394kPermet à votre agent de connecter un nouveau fournisseur de modèles IA à OpenClaw par des commandes sûres, sans clé en clair, puis de lancer un test.
acp-router
394kAide votre agent à envoyer une tâche à un assistant de code comme Claude Code ou Cursor via OpenClaw, afin que le travail s'exécute dans cet outil.
browser-automation
394kApprend à votre agent à piloter des pages web étape par étape, y compris les connexions, les onglets et la reprise lorsqu'une page ne répond plus.