code-improver
Fungsinya
Meninjau dan memperbaiki sepotong kode secara berulang dengan peninjau yang Anda sebutkan, dan berhenti ketika masalah serius sudah hilang. Skill ini untuk developer yang ingin kode diperbaiki melalui putaran tinjauan yang berulang.
Kapan dipakai
- βSaat developer ingin kode diperbaiki sampai tinjauan tidak melaporkan masalah kritis atau besar.
- βSaat developer ingin menjalankan loop perbaikan dengan skill atau agen peninjau tertentu.
- βSaat developer ingin modul diulang sampai tinjauannya lolos.
Link skill
https://github.com/trailofbits/skills/blob/main/plugins/code-improver/skills/code-improver/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βPerbaiki kode di folder utils saya sampai agen peninjau pilihan saya tidak menemukan hal serius.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill ini meminta folder target, peninjau yang dipakai, dan file yang boleh diubah. Setelah itu skill ini menjalankan loop di mana peninjau memeriksa kode dan seorang perbaiki membuat perubahan, sambil menyimpan daftar temuan yang terus diperbarui.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Apakah skill ini menebak peninjau mana yang dipakai?
Tidak. Skill ini meminta Anda menyebutkan peninjaunya, karena tidak ada peninjau bawaan.
Apa yang mencegah loop mengubah terlalu banyak?
Pembatas cakupan membatasi file mana saja yang boleh disentuh loop.
Apa yang terjadi jika perbaikan berhenti meningkatkan kode?
Loop akan meneruskan masalah alih-alih berjalan terus, sehingga Anda bisa memutuskan langkah berikutnya.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 8.0k
- Peringkat
- #12669
- Lisensi
- CC-BY-SA-4.0
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
audit-context-building
8.0kMembantu agent Anda mempelajari basis kode yang belum dikenal sebelum tinjauan keamanan, dengan memetakan apa yang diasumsikan, dijamin, dan bergantung pada setiap fungsi.
algorand-vulnerability-scanner
8.0kMembantu agent Anda memindai smart contract Algorand, yang ditulis dalam TEAL atau PyTeal, untuk 11 masalah keamanan umum seperti serangan rekeying dan biaya yang tidak diperiksa.
audit-prep-assistant
8.0kMembantu agent Anda menyiapkan basis kode untuk tinjauan keamanan dari luar, dengan analisis statis, cakupan tes, pembersihan kode mati, dan dokumentasi yang jelas.
cairo-vulnerability-scanner
8.0kMembantu agent Anda memindai smart contract Cairo di StarkNet untuk 6 masalah serius, termasuk overflow aritmetika, pesan lintas lapisan yang berisiko, dan replay tanda tangan.
Skill serupa
add-model-provider
394kMemungkinkan agent Anda menghubungkan penyedia model AI baru ke OpenClaw dengan perintah pengaturan yang aman, menjaga kunci API tetap di luar teks biasa, dan menjalankan uji langsung.
acp-router
394kMembantu agent Anda mengirim tugas ke asisten pemrograman seperti Claude Code atau Cursor lewat OpenClaw, sehingga pekerjaan dijalankan di alat tersebut.
browser-automation
394kMengajari agent Anda mengendalikan halaman web langkah demi langkah, termasuk login, tab, dan pemulihan saat halaman berhenti merespons.