surgical-changes

surgical-changes is a skill for Claude Code, Codex from orlando-japan/claude-code-setting. It costs 36 tokens per session (560 once invoked), scanned A, original, MIT.

A coding practice for making the smallest possible change needed for a bug fix or feature. It keeps unrelated code, formatting, and cleanup out of the edit.

In plain words
What is it for?
Use it when fixing bugs, adding targeted features, or preparing any code change for review.
Why use it?
It reduces noisy diffs, accidental changes, and review time. Reviewers can see which lines address the task.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/orlando-japan/claude-code-setting/surgical-changes
Any agent
npx skills add orlando-japan/claude-code-setting --skill surgical-changes
Clone the repo
git clone --depth 1 https://github.com/orlando-japan/claude-code-setting

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for surgical-changes

README.md
[![agentmods](https://agentmods.dev/badge/skills/orlando-japan/claude-code-setting/surgical-changes.svg)](https://agentmods.dev/skills/orlando-japan/claude-code-setting/surgical-changes)
Your own site
<a href="https://agentmods.dev/skills/orlando-japan/claude-code-setting/surgical-changes"><img src="https://agentmods.dev/badge/skills/orlando-japan/claude-code-setting/surgical-changes.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 560 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.00560
Opus 5 $0.00018 $0.00280
Sonnet 5 $0.00007 $0.00112
Haiku 4.5 $0.00004 $0.00056

Measured 6d ago against content hash 0e898705c986, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

surgical-changes scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

templates/extra/skills/surgical-changes/SKILL.md · 54 lines

How it starts

The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Surgical changes

The goal of a surgical change: the diff is small, focused, and obviously correct. Reviewers shouldn't have to wonder which lines are the "real" change.

Apply when

  • Fixing a bug.
  • Making a targeted feature addition.
  • Any change that will be reviewed (which is all of them).

Rules

  1. Touch only lines the task requires. If you find yourself about to edit a file the task doesn't mention, stop and justify.
  2. Don't reformat. If the file uses 2-space indent and you prefer 4, use 2. If it uses let and you prefer const, use let. Match what's there.
  3. Don't rename unrelated things. A rename is its own commit.
  4. Don't re-order. Reordering declarations, imports, or methods for aesthetic reasons adds noise to the diff.
  5. Don't add unrelated tests. Fix your bug with its regression test. That's it.
  6. Don't remove unrelated dead code. Put it on a todo list; do it separately.
  7. If you notice a real bug unrelated to the task, stop and tell the user. Don't silently fix it in the same change.

Before committing

Look at the diff. For every hunk, ask: "Does this line directly implement the task?" If the answer is no or "sort of," revert that hunk.

Typical cuts:

  • Whitespace-only changes → revert.
  • Import re-sorting → revert.
  • Comment rewording → revert unless the comment was actively wrong.
  • Variable renames → revert unless ambiguity was causing the bug.
  • "Cleanup" of unrelated logic → revert and file a separate ticket.

Exception — fixing on the way through

Rarely, small unrelated fixes inside a file you're already touching are acceptable:

  • Obvious typo in a string literal that will ship in UI.
  • Misleading comment right next to your change that would confuse the reviewer.
  • console.log left over from someone else's debugging in code you're editing.

Call these out explicitly in the commit body: "Also fixed X — unrelated but one-line."

Why this matters

Small diffs are reviewable. A review that finds a real bug is worth more than a diff that silently improves ten things. Bundled cleanup also attributes blame wrong when git blame runs.

Read the full file on GitHub · 54 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 54 lines · 36 tokens per session scan A 0e898705c986

Subscribe to this mod's changes

surgical-changes is a skill published in the GitHub repository orlando-japan/claude-code-setting (2 stars, last pushed 3mo ago), licensed MIT. It adds 36 tokens to every session and 560 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories