implement-patch skill
✓ 検証済み不変条件レベルの修正、回帰テストの作成、および構造化されたパッチレコードの生成を通じて、確認済みのローカルバグを修正します。
- GitHubスター
- 8,136
- ファイル
- 1
- 最終コミット
- 2026年11月11日
- ライセンス
- CC-BY-SA-4.0
- 許可されたツール
- —
implement-patch skillは何をしますか
implement-patchはAgent Skillsです。 不変条件レベルの修正、回帰テストの作成、および構造化されたパッチレコードの生成を通じて、確認済みのローカルバグを修正します。.
skillのSKILL.mdから生成された要約。
implement-patch skill について
不変条件レベルの修正と回帰テストを通じて、確認済みのローカルバグを修復することがこの SKILL の主な機能です。開発者は、バグがすでに独立して検証されており、推測による探索ではなく構造化された修復プロセスが必要な場合に使用します。エージェントは厳格な手順に従い、まず uv run を使用してレコードバリデータによるチェックを実行し、修復範囲とケースプランが利用可能であることを確認します。
破損した不変条件が特定されると、エージェントは境界内にある違反のすべてのインスタンスを探索します。次に、ベースラインで失敗する回帰テストを作成した後、不変条件を修正するために最小限かつレビュー可能な変更を適用します。プロセスは、patch ディレクトリ内に fix.patch と tests.patch という2つの特定のファイルを生成することで完了します。最後に、エージェントはコミット SHA、ファイル統計、およびテストスイートの結果を含む patch.json レコードを作成し、これを manifest コマンドを使用してマニフェスト化し、レコードバリデータで検証します。
エージェントができること
- 1検証済みローカルバグの修正独立した検証を通じてすでに確認されているバグに対して、不変条件レベルの修復を適用します。
- 2回帰テストの作成バグとそのバリアントが対処されていることを確認するために、現在のベースラインで失敗する新しいテストを開発します。
- 3構造化されたパッチレコードの生成コミットの詳細、変更された行数、およびテストスイートの結果を含む patch.json ファイルを生成します。
- 4不変条件違反の探索破損した不変条件の境界内にある、特定の違反のすべてのインスタンスを特定します。
skill の SKILL.md から作成されています。すべてのユースケースは、その引用と照合されています。
implement-patch skillのインストール方法
各コマンドはskillフォルダをクライアントのskillsディレクトリにコピーします。読み込むには、クライアントを再起動するか新しいセッションを開始してください。プラグインにimplement-patch skillをインストールする
/plugin marketplace add trailofbits/skills /plugin install patching-bugs@trailofbits
Claude Codeにimplement-patch skillをインストールする
~/.claude/skills/implement-patch/SKILL.md
$ npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch ~/.claude/skills/implement-patchClaude Code (project)にimplement-patch skillをインストールする
.claude/skills/implement-patch/SKILL.md
$ npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch .claude/skills/implement-patchCodexにimplement-patch skillをインストールする
~/.agents/skills/implement-patch/SKILL.md
$ npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch ~/.agents/skills/implement-patchGemini CLIにimplement-patch skillをインストールする
~/.gemini/skills/implement-patch/SKILL.md
$ npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch ~/.gemini/skills/implement-patchClaude.aiにimplement-patch skillをインストールする
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
自動チェック
実行日 2026年11月14日詳細レポート →自動チェックに合格しました。これはセキュリティ監査ではありません。エージェントに実行させる前にスクリプトを読んでください。 チェックの仕組み
- ソースリポジトリがリンクされており、アクセス可能trailofbits/skills/plugins/patching-bugs/skills/implement-patch is public and reachablegithub.com/trailofbits/skills/tree/HEAD/plugins/patching-bug ↗合格
- オープンソースライセンス (OSI)CC-BY-SA-4.0 is not OSI-approvedspdx.org/licenses/CC-BY-SA-4.0.html ↗検出事項
- 過去1年以内にコミットまたはリリースありLast commit 2026-11-11github.com/trailofbits/skills/commits ↗合格
- スクリプトにダウンロード実行や認証情報の窃取がないNo scripts in the skill folder合格
- SKILL.md に隠れた指示がないNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/trailofbits/skills/blob/HEAD/plugins/patching-bug ↗合格
- 事前許可ツールが限定されているNo pre-approved tools; the agent asks before using onegithub.com/trailofbits/skills/blob/HEAD/plugins/patching-bug ↗合格
SKILL.md
GitHubで表示Implement 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. |
このスキルのファイル
1implement-patch skillに関する質問
Claude Codeにimplement-patch skillをインストールするには
npx degit trailofbits/skills/plugins/patching-bugs/skills/implement-patch ~/.claude/skills/implement-patchを実行してください。Claude Codeは~/.claude/skills(すべてのプロジェクト)または.claude/skills(単一プロジェクト)からskillsを読み込み、説明がタスクに一致する場合にskillを使用します。
implement-patch skillはどのクライアントで使用できますか
Agent Skills形式を読み込むすべてのクライアントで使用できます: Claude Code、Codex、Gemini CLI、claude.ai(ZIPとしてアップロード)。skill内のスクリプトは、クライアントがコード実行を許可した場合にのみ実行されます。
implement-patch SKILL はどのような時に使用すべきですか?
独立した検証によってバグが確認され、不変条件レベルの修正、バリアントの探索、およびローカルコミットの作成が必要な場合に使用してください。
推測によるバグハンティングに使用できますか?
いいえ、この SKILL は推測によるバグハンティングや、パッチが完了したことを証明するために使用しないでください。
最初のレコードバリデータによるチェックが失敗した場合はどうすればよいですか?
チェックが失敗した場合は、作業を停止し、エラーを INCONCLUSIVE レポートとして返してください。
変更をリモートリポジトリにプッシュすべきですか?
いいえ、ローカルコミットを正確に1つ作成してください。プッシュやプルリクエストの作成は絶対に行わないでください。