Communityコーディング&開発github.com

Surgical Patch

バグ修正や小さな振る舞いの変更を、原因となる最も狭い層で行います。回帰テストの証明、周囲の振る舞いの維持、タスクに関連するテストが重要な場合に使用します。

Surgical Patch とは?

このスキルは、バグや振る舞いの小さな変更を、問題の原因を最も直接的に担当する狭い範囲のコード層に限定して修正するための手法です。変更の影響範囲を最小限に抑え、修正以外のコード(リファクタリングやリネームなど)は一切行わず、周囲の振る舞いを完全に維持することに重点を置きます。修正の有効性を証明するため、可能な限り問題を再現するテストを先に作成し(経済的でない場合は利用可能な最も強力な証拠をキャプチャ)、修正後にテストが通過することを確認します。主にソフトウェア開発におけるデバッグやピンポイント修正のタスクに適しており、Claude Code、Cursor、CodexなどのAIエージェントが開発環境で利用することを想定しています。これにより、確実な回帰防止とタスク関連テストの充足を両立できます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/JuliusBrussee/caveman/tree/main/skills/surgical-patch

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

サージカルパッチ

経済的な場合にはまず障害を再現し、それ以外の場合は利用可能な最も強力な証拠をキャプチャします。

  • 症状から原因となるメカニズムを辿る。
  • 誤った振る舞いを所有する最も狭い層を変更する。
  • 無関係な振る舞いやユーザーの変更を維持する。
  • 修正範囲外のクリーンアップ、リネーム、抽象化を避ける。
  • タスクに関連する回帰証明のみを追加する。

フォーカスした証明と最も近く影響を受けるゲートを実行します。障害が修正され、回帰証明がパスした時点で停止します。

Individual skills in this repo

This repo contains 12 individual skills — each has its own dedicated page.

JuliusBrussee/caveman-discover

Find and label every LLM workflow in the repository so Caveman Cloud groups spend by workflow instead of one bucket. Use for "discover workflows" or breaking LLM spend down by workflow.

JuliusBrussee/caveman-evidence-review

Read-only review of Caveman Cloud evidence: cost, Cave Score, workflows, traces, latency, errors, routing, savings. Use when asked what Caveman found or where LLM spend goes.

JuliusBrussee/caveman-explore

Read-only repository explorer for cold-start orientation, broad cross-file localization, or when a direct search failed. Skip it when the exact file or symbol is already named. Returns path:line citations only; its reads stay out of main context.

JuliusBrussee/caveman-learn

Act on a Caveman learn report - review the ranked token sinks, apply cost-lowering fixes with per-edit consent, and report what those fixes returned. Use when asked to lower an agent's token cost, what caveman has saved, to trim a heavy CLAUDE.md, or to offload re-pasted context into cavemem.

JuliusBrussee/caveman-manage

Inspect Caveman Cloud's experiment lifecycle and block unsafe execution. Use when asked to start, approve, cancel, promote or roll back a Caveman experiment.

JuliusBrussee/caveman-optimize

Turn a Caveman optimization observation into an operator-chosen candidate with a paired baseline evaluation. Use when asked to inspect or evaluate a Caveman optimization report. Needs explicit approval.

JuliusBrussee/caveman-setup

Wire a repository through the Caveman Cloud gateway so every LLM request is measured, with no behavior change. Use for "set up caveman" or adding LLM spend observability.

JuliusBrussee/investigate-first

Diagnose ambiguous failures before editing. Use for unknown causes, intermittent behavior, performance regressions, or investigations needing evidence-ranked hypotheses.

JuliusBrussee/lean-build

Build feature work with high overbuilding risk. Use for new behavior, product slices, or integrations where repository reuse, strict scope, and an explicit stop condition matter.

JuliusBrussee/migration

Implement reversible compatibility-safe transitions. Use for schema, data, API, protocol, configuration, or dependency migrations requiring rollback and preservation proof.

JuliusBrussee/safe-refactor

Restructure code while preserving behavior. Use for extraction, consolidation, ownership moves, or cleanup where verification must bracket structural edits.

JuliusBrussee/verify-and-stop

Prove existing work meets acceptance conditions without expanding scope. Use for validation-only tasks, completion checks, focused gate runs, and last-mile proof.

関連スキル