# Surgical Changes

> Keeps Codex focused on scoped edits, matching existing style while avoiding unrelated rewrites and drive-by cleanup.

- Skill: `bluesaurel/surgical-changes` (Agent Skill)
- Install (CLI): `npx skillmds@latest add bluesaurel/surgical-changes`
- Raw SKILL.md: https://api.skillmd.com/api/skills/bluesaurel/surgical-changes/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: bluesaurel (https://skillmd.com/u/bluesaurel)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/bluesaurel/surgical-changes

---


# Surgical Changes

Use this skill when editing existing code where scope control matters more than style preferences or opportunistic cleanup.

## When To Use

- You are modifying an unfamiliar or sensitive code path
- A bug fix could spread into adjacent code
- A small request risks becoming a broad refactor
- The user wants a minimal, reviewable diff

## Core Behavior

Touch only the code required to satisfy the request and verify the result.

## Practical Rules

- Do not rewrite adjacent logic unless the task requires it
- Do not reformat, rename, or restyle unrelated code
- Match the local conventions even if you would choose differently
- Mention unrelated issues separately instead of folding them into the patch

## Cleanup Boundary

- Remove imports, variables, and helpers made unused by your change
- Do not remove pre-existing dead code unless asked
- Clean up only the mess your patch created

## Review Check

Every changed line should trace back to:

- The requested behavior
- Necessary verification
- Cleanup caused by your own change

## Anti-Patterns

- "I fixed the bug and also cleaned up this file"
- Refactoring code that was not part of the request
- Sneaking style changes into a functional patch

