本文へ移動
cccskills
無料GitHub で公開日本語紹介

implement-patch

確認済みのローカル不具合に対し、守るべき条件の破れと同種の問題を範囲内で調べ、修正前後のテスト結果、差分、単一のローカルコミットを残します。

原文原文の説明を見る

Use when a confirmed local bug needs an invariant-level fix, variant search, tests, and one local commit.

インストール方法を見る

こんなときに便利

  • 独立検証済みの不具合を直したいとき
  • 修正範囲内の同種の問題を調べたいとき
  • テスト結果と修正差分を残したいとき

日本語での紹介

できること

独立した検証で確認済みの不具合を、コードが守るべき条件に立ち返って修正します。指定された修正範囲の中で同じ条件違反がないか探し、既存テストの結果を記録します。対象の不具合や修正する類似ケースについて、修正前に失敗する回帰テストを確認してから変更を加えます。修正後は回帰テストと既存テスト一式を再実行し、結果を比較します。成果物は一つのローカルコミットと、実装用のfix.patch、テスト用のtests.patch、結果をまとめたpatch.jsonです。

こんなときに便利

原因が確認できた不具合を、レビューしやすい変更としてまとめたいときに向いています。同じ問題の類似ケースについても、修正したものと未修正のものを理由付きで残したい場面に使えます。

使い方の例

  • 「確認済みの不具合を指定範囲で直し、修正前に失敗するテストも追加して」
  • 「同じ条件違反を範囲内で探し、修正結果と差分を記録して」

注意点

事前の独立検証と、利用可能なケース計画を含む修正記録が必要です。付属の記録検証スクリプトはuv run --no-projectで実行します。ローカルのコンパイラや実行環境で確認できない変更、未確認のバグ探し、完成した修正の証明は対象外です。pushやPR作成は行いません。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(1)

  • SKILL.md3.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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

  1. 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 requires finding.repair_scope with 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.

  2. 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.

  3. 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.

  4. Record every variant as fixed or not_fixed with a reason. Produce exactly one local commit. Never push or open a PR. From the baseline, write fix.patch for production changes and tests.patch for test changes in patch/attempt-N/.

  5. Write patch.json with the two commit SHAs, changed-file and line counts, variants, suite results, and your agent identity. If the attempt produced no commit, record patch_commit: null and return it as failed. Manifest the entire attempt directory, including both patch files and the record, using uv run --no-project <script> manifest <patch-attempt-dir>. Check it with the record validator.

    Patch record schema:

{
  "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

ShortcutRequired 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.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

address-sanitizer

無料概要あり

C/C++やunsafeを含むRustのテストで、領域外アクセスや解放済みメモリの使用を検出します。ビルド設定からクラッシュ報告の読み解きまで支援します。

  • C/C++のファジング中のメモリエラー検出
  • Rustのunsafeや外部呼び出しの検証
  • ASanのクラッシュ報告を読みたいとき
trailofbits/skills7,6662026年10月21日 更新

adjudicate-regression

無料概要あり

変更前後のソースと実環境での再現・独立検証の証拠を照合し、新たな不具合か、既存の問題や判定保留かを根拠付きで整理して判定記録に残すスキル。

  • 変更が新しい不具合を生んだか判定したいとき
  • 既存の不具合と新規の問題を区別したいとき
  • 証拠不足と未解決事項の整理
trailofbits/skills7,6662026年10月21日 更新

aflpp

無料概要あり

C/C++のプログラムに多様な入力を与えて不具合を探すテストを、AFL++で複数コアに並列化し、実行状況の確認からクラッシュの再現・調査まで支援するスキル。

  • C/C++の検査を複数コアで回したいとき
  • libFuzzerでの探索が停滞したとき
  • ファジングの進捗や安定性を確認したいとき
trailofbits/skills7,6662026年10月21日 更新

agentic-actions-auditor

無料概要あり

GitHub Actionsで動くAIエージェントへの不正な指示の混入や危険な権限設定を点検します。外部入力が届く経路を追い、根拠と重大度、修正案を報告します。

  • AIエージェントを使うCIの点検
  • IssueやPRからの指示混入経路の調査
  • サンドボックスやユーザー許可設定の確認
trailofbits/skills7,6662026年10月21日 更新

Algorandのスマートコントラクトを11種類の脆弱性パターンで点検し、権限や手数料、入力検証の問題を根拠・修正案付きで報告するスキル。

  • Algorandの監査前点検
  • TEAL・PyTealの取引検証レビュー
  • 報告された脆弱性の修正確認
trailofbits/skills7,6662026年10月21日 更新

atheris

無料概要あり

PythonコードやC拡張へ多様な入力を与えるファジングを導入し、予期しない例外やメモリ破損を探します。実行環境の準備からテスト用コードの作成、結果の読み取りまで支援します。

  • Pythonパッケージやパーサーのファジング
  • PythonのC拡張のメモリ破損調査
  • バイト列から型付きテスト引数を作りたいとき
trailofbits/skills7,6662026年10月21日 更新

trailofbits のスキルをすべて見る

このスキルの問題を報告する