Community编程与开发github.com

JuliusBrussee/surgical-patch

修复错误和小行为变更,聚焦于最窄的责任层。在需要回归验证、保持周围行为不变且任务相关测试重要时使用。

surgical-patch 是什么?

该技能定义了一种“外科手术式”的错误修复和微小行为变更方法,强调在代码库的最窄责任层进行精确修改。其核心原则包括:优先重现失败以获取最强证据,然后追踪症状到负责机制,只修改拥有错误行为的最窄层,并严格避免引入无关的清理、重命名或抽象。修复后,仅添加与任务直接相关的回归测试,并运行该测试以及最近受影响的网关测试,直到失败被修复且回归测试通过。该技能适用于任何支持自定义技能的 AI 编码助手(如 Claude Code、Cursor 等),特别适合那些注重代码稳定性、最小化变更范围和回归保障的场景。通过强制开发者专注于问题根源而非周边代码,它有助于维护代码库的整洁性和可维护性。

兼容平台~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 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

外科手术补丁

优先以经济的方式重现失败;否则捕获最强可用的证据。

  • 将症状追踪到负责的机制。
  • 修改拥有错误行为的最窄层。
  • 保留不相关的行为和用户更改。
  • 避免在修复之外进行清理、重命名和抽象。
  • 仅添加与任务相关的回归证明。

运行聚焦的证明以及最近受影响的网关。当失败被修复且回归证明通过时停止。

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.

相关技能