Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

surgical-patch — Claude Code skill: what it does, how to install

The skill constrains AI coding agents to the narrowest layer responsible for a bug. It prevents unwanted refactoring and demands focused regression checks.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add JuliusBrussee/caveman --skill surgical-patch -a claude-code
Open on GitHub

What surgical-patch does

This skill directs the agent to reproduce failures before touching any files. It traces symptoms down to the exact mechanism at fault. Unrelated code remains untouched. The agent modifies only the narrowest layer that owns the bug.

The instructions explicitly rule out cosmetic cleanups and renames outside the immediate fix. The agent writes a targeted regression proof and runs the nearest affected gate. Once the proof passes, work stops immediately. If you want broad module restructuring, skip this skill.

What it helps with

  • reproduce failures before editing code
  • isolate bug fixes to the narrowest layer
  • prevent accidental refactoring and renaming
  • add focused regression tests for specific defects

Example prompts for the agent

  • Use surgical-patch to fix the null session error in auth middleware
  • Fix the token expiration bug without touching surrounding handlers

How to install surgical-patch

1Skills CLI (Vercel)

npx skills add JuliusBrussee/caveman --skill surgical-patch -a claude-code

2Manually: put the files in place

~/.claude/skills/surgical-patch/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/surgical-patch/

From the same set22

The whole set →
caveman JuliusBrussee Cuts filler and polite greetings from agent responses while keeping technical facts and code exact. Stays active until turned off. Claude Code CX Codex Cursor +1 591,500installs caveman-commit JuliusBrussee Generates terse Conventional Commits messages focused strictly on intent. Ideal for keeping git history clean without boilerplate or AI signatures. Claude Code CX Codex Cursor +1 414,700installs caveman-review JuliusBrussee Generates terse, single-line code review comments with exact line numbers, problems, and fixes. Eliminates conversational filler in pull request reviews. Claude Code CX Codex Cursor +1 410,700installs caveman-compress JuliusBrussee Rewrites CLAUDE.md and todo files into terse caveman-speak so the model reads fewer input tokens. The source gets overwritten; a readable backup stays out of tree. Claude Code CX Codex Cursor +1 410,300installs caveman-help JuliusBrussee A quick reference for Caveman modes and commands in Claude Code and other supported hosts. Use it when you need to control response style or find related skills. Claude Code CX Codex Cursor +1 401,800installs cavecrew JuliusBrussee cavecrew delegates code searches, small edits, and diff reviews to three subagents. Use it when keeping the main agent's context lean matters. Claude Code CX Codex Cursor +1 357,900installs caveman-stats JuliusBrussee Displays recorded output and cache-read tokens for Claude Code sessions or points to host native usage stats. Useful for tracking raw token consumption. Claude Code CX Codex Cursor +1 356,700installs caveman-explore JuliusBrussee A read-only skill locates relevant files and line ranges in a repository. Use it for cold-start orientation or broad searches. Claude Code CX Codex Cursor +1 106,500installs

Similar

ponytail-audit DietrichGebert It audits a repository and ranks bugs, risks, and redundant code in a one-shot report. Use it when you need a review without code changes. Claude Code CX Codex Cursor +1 44,800installs code-review-and-quality addyosmani Five review axes and a limit on diff size, so an agent checks a change before merge instead of after. Claude Code CX Codex Cursor +1 72,500installs security-and-hardening addyosmani Guides threat modeling and security checks for code that handles user input, authentication, sessions, or external services. Use it when building a feature that accepts untrusted data or reviewing code before release. Claude Code CX Codex Cursor +1 69,400installs improve-codebase-architecture Matt Pocock This skill scans a codebase for architectural friction, then builds a visual HTML report with refactoring candidates. Use it before a deeper architecture review. Claude Code 1,163,035installs design-taste-frontend Leonxlnx This skill directs the design of public pages and work screens, then checks the result in a browser through screenshots. Use it when an interface feels generic or unfinished. Claude Code CX Codex Cursor +1 673,100installs tdd Matt Pocock Guides the red-green TDD loop: ensures tests are written first, keep them at public interfaces, and avoid coupling to implementation details. Claude Code 1,141,062installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. Claude Code Claude.ai 414,180installs agent-browser vercel-labs A CLI skill for browser control: it opens pages, fills forms, clicks buttons, and tests web apps. Use it when an agent needs to act inside a website. Claude Code CX Codex Cursor +1 1,200,000installs

Questions about surgical-patch

How to install surgical-patch in Claude Code?

Run npx skills add JuliusBrussee/caveman --skill surgical-patch -a claude-code in your terminal. This downloads the skill into your local agent configuration.

What does surgical-patch do?

It enforces strict discipline on bug fixes. The model must isolate the failure mechanism, keep unrelated code intact, and verify the fix with a targeted test.

Does surgical-patch allow general code cleanup?

No, the instructions explicitly forbid renaming and abstraction outside the immediate patch. The agent must stop as soon as the regression check passes.

Source text

SKILL.md · Apache-2.0
---
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.

© JuliusBrussee · Apache-2.0 · JuliusBrussee/caveman

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor