# surgical-patch

Fixes bugs and small behavior changes at the narrowest layer, with regression proof and tests showing surrounding behavior is unchanged.

Skill by Julius Brussee. Category: Code quality.

## Install

Project (for this project only):

```sh
npx skills add juliusbrussee/caveman --skill surgical-patch
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx skills add juliusbrussee/caveman --skill surgical-patch -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.

## Security audits

- Gen Agent Trust Hub: Pass
- Socket: Pass
- Snyk: Pass

Installs: 103211. Installs counted by skills.sh. [Open on skills.sh](https://www.skills.sh/juliusbrussee/caveman/surgical-patch)

## Source

[Open the source](https://github.com/juliusbrussee/caveman/tree/HEAD/skills/surgical-patch). Checked 2026-10-24. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

## SKILL.md

````markdown
---
name: surgical-patch
description: Fix bugs and small behavior changes at the narrowest responsible layer. Use when regression proof, preserved surrounding behavior, and task-relevant tests matter.
---

# Surgical patch

Reproduce failure first when economical; otherwise capture strongest available evidence.

- Trace symptom to responsible mechanism.
- Change narrowest layer that owns incorrect behavior.
- Preserve unrelated behavior and user changes.
- Avoid cleanup, renaming, and abstraction outside fix.
- Add only regression proof relevant to task.

Run focused proof plus nearest affected gate. Stop when failure is fixed and regression proof passes.
````

- Previous: [verify-and-stop](https://syn4pse.dev/terminal/verify-and-stop.md)
- Next: [caveman-evidence-review](https://syn4pse.dev/terminal/caveman-evidence-review.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
