Skill implement-patch
✓ VerifiedMemperbaiki bug lokal yang telah terkonfirmasi dengan menerapkan perbaikan pada level invariant, menulis regression test, dan menghasilkan catatan patch yang terstruktur.
- Bintang GitHub
- 8.136
- File
- 1
- Commit terakhir
- 11 Nov 2026
- Lisensi
- CC-BY-SA-4.0
- Tool yang diizinkan
- —
Apa fungsi skill implement-patch?
implement-patch adalah agent skill. Memperbaiki bug lokal yang telah terkonfirmasi dengan menerapkan perbaikan pada level invariant, menulis regression test, dan menghasilkan catatan patch yang terstruktur.
Ringkasan dibuat dari SKILL.md skill ini.
Tentang skill implement-patch
Memperbaiki bug lokal yang telah terkonfirmasi melalui perbaikan level invariant dan regression testing adalah fungsi utama dari skill ini. Developer menggunakannya ketika sebuah bug telah divalidasi secara independen dan membutuhkan proses perbaikan yang terstruktur, bukan sekadar pencarian spekulatif. Agent mengikuti prosedur ketat yang dimulai dengan menjalankan pengecekan menggunakan record validator dengan perintah uv run untuk memastikan scope perbaikan dan case plan dapat digunakan.
Setelah invariant yang rusak teridentifikasi, agent akan mencari semua instance pelanggaran di dalam batasannya. Agent kemudian menulis regression test yang gagal pada baseline sebelum menerapkan perubahan terkecil yang dapat ditinjau untuk memperbaiki invariant tersebut. Proses ini diakhiri dengan menghasilkan dua file spesifik, fix.patch dan tests.patch, di dalam direktori patch. Terakhir, agent menghasilkan catatan patch.json yang berisi commit SHAs, statistik file, dan hasil suite, yang kemudian dimanifestasikan menggunakan perintah manifest dan diverifikasi dengan record validator.
Apa yang bisa dilakukan agent dengannya
- 1Memperbaiki bug lokal yang telah divalidasiMenerapkan perbaikan level invariant pada bug yang telah dikonfirmasi melalui validasi independen.
- 2Membuat regression testsMengembangkan test baru yang gagal pada baseline saat ini untuk memastikan bug dan variannya telah teratasi.
- 3Menghasilkan catatan patch yang terstrukturMenghasilkan file patch.json yang berisi detail commit, jumlah baris yang berubah, dan hasil test suite.
- 4Mencari pelanggaran invariantMengidentifikasi setiap instance dari pelanggaran spesifik di dalam batasan sebuah invariant yang rusak.
Ditulis dari SKILL.md milik skill tersebut. Setiap use case diverifikasi dengan kutipan darinya.
Cara install skill implement-patch
Setiap perintah menyalin folder skill ke direktori skills client. Restart client atau mulai sesi baru untuk memuatnya.Install skill implement-patch di Plugin
/plugin marketplace add trailofbits/skills /plugin install patching-bugs@trailofbits
Install skill implement-patch di Claude Code
~/.claude/skills/implement-patch/SKILL.md
$ npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch ~/.claude/skills/implement-patchInstall skill implement-patch di Claude Code (project)
.claude/skills/implement-patch/SKILL.md
$ npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch .claude/skills/implement-patchInstall skill implement-patch di Codex
~/.agents/skills/implement-patch/SKILL.md
$ npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch ~/.agents/skills/implement-patchInstall skill implement-patch di Gemini CLI
~/.gemini/skills/implement-patch/SKILL.md
$ npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch ~/.gemini/skills/implement-patchInstall skill implement-patch di Claude.ai
npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch implement-patch && zip -r implement-patch.zip implement-patch # claude.ai → Customize → Skills → + → Create skill → Upload a skill → implement-patch.zip
Pengecekan otomatis
Berjalan 14 Nov 2026Laporan lengkap →Lolos cek otomatis kami. Ini bukan audit keamanan: baca skripnya sebelum membiarkan agent menjalankannya. Cara kerja checks
- Source repository terhubung dan dapat dijangkautrailofbits/skills/plugins/patching-bugs/skills/implement-patch is public and reachablegithub.com/trailofbits/skills/tree/HEAD/plugins/patching-bug ↗Lolos
- Lisensi open source (OSI)CC-BY-SA-4.0 is not OSI-approvedspdx.org/licenses/CC-BY-SA-4.0.html ↗Temuan
- Ada commit atau release dalam satu tahun terakhirLast commit 2026-11-11github.com/trailofbits/skills/commits ↗Lolos
- Skrip tanpa unduh-lalu-jalankan atau pencurian kredensialNo scripts in the skill folderLolos
- Tidak ada instruksi tersembunyi di SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/trailofbits/skills/blob/HEAD/plugins/patching-bug ↗Lolos
- Tool yang diizinkan otomatis dibatasiNo pre-approved tools; the agent asks before using onegithub.com/trailofbits/skills/blob/HEAD/plugins/patching-bug ↗Lolos
SKILL.md
Lihat di GitHubImplement Patch
When to Use
Use after independent validation confirms one claim. Read the record contract. Before target commands, follow its project guidance.
When NOT to Use
Do not use for speculative bug hunting, proof of a completed patch, or a change that cannot be exercised by the local compiler or runtime.
Procedure
-
Before editing, run
uv run --no-project <script> check --before-repair <run-dir>with the record validator. If this check fails, stop and return its errors for an INCONCLUSIVE report. The gate requiresfinding.repair_scopewith a usable case plan and a consistent attempt count. Use the declared scope as the repair brief. Identify the broken invariant and search within its boundary for every instance of the same violation. Read the threat model only to preserve intended behavior; it is not a gate. -
Run the project's existing suite and record its results. Write a regression test that fails on the baseline for the named bug and any fixed variant. Observe the failure. Fix the invariant within the repair brief with the smallest reviewable change.
-
Run the regression test and full existing suite again. Compare before and after failures. Fix new failures or explain a pre-existing one from receipts.
-
Record every variant as
fixedornot_fixedwith a reason. Produce exactly one local commit. Never push or open a PR. From the baseline, writefix.patchfor production changes andtests.patchfor test changes inpatch/attempt-N/. -
Write
patch.jsonwith the two commit SHAs, changed-file and line counts, variants, suite results, and your agent identity. If the attempt produced no commit, recordpatch_commit: nulland return it as failed. Manifest the entire attempt directory, including both patch files and the record, usinguv run --no-project <script> manifest <patch-attempt-dir>. Check it with the record validator.
{
"schema_version": 1,
"attempt": 1,
"baseline_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"patch_commit": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"files_changed": 2,
"lines_added": 3,
"lines_removed": 1,
"variants": [],
"suite_before": {"command": "pytest", "passed": 9, "failed": 1, "skipped": 0},
"suite_after": {"command": "pytest", "passed": 10, "failed": 0, "skipped": 0},
"agent": "patcher-1"
}
Rationalizations to Reject
| Shortcut | Required action |
|---|---|
| Only the reported line matters. | Search for the same invariant violation. |
| Minimal means the fewest lines. | Make the smallest reviewable invariant-level fix. |
| Tests pass after the patch. | Show the regression test failed before it. |
Berkas dalam skill ini
1Pertanyaan seputar skill implement-patch
Bagaimana cara install skill implement-patch di Claude Code?
Jalankan npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch ~/.claude/skills/implement-patch. Claude Code memuat skill dari ~/.claude/skills (semua proyek) atau .claude/skills (satu proyek) dan menggunakan skill saat deskripsinya cocok dengan tugas.
Client mana saja yang bisa menggunakan skill implement-patch?
Client apa pun yang membaca format Agent Skills: Claude Code, Codex, Gemini CLI, dan claude.ai (unggah sebagai ZIP). Script dalam skill hanya berjalan di client yang mengizinkan eksekusi kode.
Kapan saya harus menggunakan skill implement-patch?
Gunakan skill ini setelah validasi independen mengonfirmasi adanya bug dan Anda perlu melakukan perbaikan pada level invariant, mencari varian bug, serta membuat local commit.
Bisakah saya menggunakan skill ini untuk mencari bug secara spekulatif?
Tidak, skill ini tidak boleh digunakan untuk mencari bug secara spekulatif atau untuk membuktikan bahwa sebuah patch telah selesai.
Apa yang harus saya lakukan jika pengecekan initial record validator gagal?
Jika pengecekan gagal, Anda harus berhenti dan mengembalikan error tersebut sebagai laporan INCONCLUSIVE.
Haruskah saya melakukan push perubahan ke remote repository?
Tidak, Anda hanya boleh membuat tepat satu local commit dan jangan pernah melakukan push atau membuka pull request.