surgical-changes
Skill216 starsChanged 6 months agoMITView on GitHub
Enforces minimal code modifications — touch only what you must. Prevents drive-by refactoring, comment deletions, and style changes unrelated to the task.
We split this skill into the rules it gives an agent
10 rules. 0 are common, 9 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Every changed line is a line the reviewer must inspect, a line that could introduce a regression, and a line that will appear in the git …
- Distinctive: line 20
When your diff is larger than you expected
- Distinctive: line 21
When reviewing your own generated changes before presenting them
- Distinctive: line 27
Read the task carefully. Write down exactly which files and functions need to change.
- Distinctive: line 41
If you notice something wrong outside the boundary:
- Very specific: line 44
If your changes made imports/variables/functions unused: remove only those created by YOUR changes.
- Distinctive: line 46
Verify: No line changed that wasn't part of the defined scope.
- Distinctive: line 50
Read through your diff line by line.
- Distinctive: line 52
If you can't answer → revert it
- Distinctive: line 55
Verify: Every changed line has a clear reason directly tied to the task.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Overview
Every changed line is a line the reviewer must inspect, a line that could introduce a regression, and a line that will appear in the git blame forever. Unnecessary changes are costly.
AI agents often "improve" adjacent code, reformat files, rename variables for consistency, or delete "dead" code — all without being asked. This creates noisy diffs, unexpected behavior changes, and broken trust.
This skill enforces a hard rule: every changed line must trace directly to the user's request.
When to Use
- Any time you are modifying existing code (not creating new files)
- When your diff is larger than you expected
- When reviewing your own generated changes before presenting them
Process
Step 1: Establish the Change Boundary
- Read the task carefully. Write down exactly which files and functions need to change.
- Draw a mental boundary: "Everything outside this boundary is out of scope."
- List what you will NOT change, even if you'd do it differently:
- Adjacent functions
- Variable naming conventions
- Comment style
- Import order
- Formatting/whitespace (unless fixing a specific bug)
Verify: You can name the specific functions/lines that need to change.
Step 2: Make Only the Required Changes
- Make the changes — and only the changes — within the defined boundary.
- If you notice something wrong outside the boundary:
- Mention it in a comment — don't fix it silently
- Example: "Note: I noticed
fetchUserhas no error handling, but I'm leaving that for a separate PR."
- If your changes made imports/variables/functions unused: remove only those created by YOUR changes. Leave pre-existing dead code alone (unless asked).
Verify: No line changed that wasn't part of the defined scope.
Step 3: Review Your Own Diff
- Read through your diff line by line.
- For each changed line, ask: "Why did I change this?"
- If you can't answer → revert it
- Flag any changes that are purely cosmetic and ask: "Should I include this?"
Verify: Every changed line has a clear reason directly tied to the task.
Step 4: Document Scope Decisions
- In your PR/commit message, explicitly note what you chose NOT to change and why:
- "Did not refactor the adjacent
parseDatefunction — out of scope for this fix."
- "Did not refactor the adjacent
Common Rationalizations (and Rebuttals)
| Excuse | Rebuttal |
| "I improved it while I was there" | That's a separate PR. Drive-by improvements hide bugs and inflate diffs. |
| "The old comment was wrong" | Fix comments related to your change. Leave others for a documentation PR. |
| "I made the code more consistent" | Consistency PRs should be standalone. Don't bundle them. |
| "It's just whitespace" | Whitespace changes cause merge conflicts and obscure real diffs in blame. |
| "The dead code is obviously wrong" | File an issue. Don't delete pre-existing code without explicit approval. |
Red Flags
- Your diff is 3× larger than the feature size suggests
- You changed files that aren't related to the task
- You reformatted a file "while you were there"
- You renamed variables for consistency
- You deleted comments or code you didn't fully understand
- Your PR description says "and also fixed a few other things"
Verification
- Every changed line traces to the task description
- No cosmetic-only changes bundled in (or explicitly approved)
- Pre-existing dead code left untouched (or flagged, not deleted)
- Changes to adjacent unrelated code: zero
- Diff size is proportional to task size
References
- simplicity-first skill
- code-review skill
- Karpathy: "They still sometimes change/remove comments and code they don't sufficiently understand as side effects, even if orthogonal to the task."
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- yuchi-chang/no-cape★ 2same name
- lightarktech/founder-coding-skills★ 1same name
- yakoshiq/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-qa-run-reviewSkill
- ai-output-validationSkill
- api-designSkill
- ci-cd-pipelinesSkill
- citruscoastaiSkill
- code-explanationSkill
- code-reviewSkill
- context-loadingSkill
- debugging-methodologySkill
- documentationSkill
- error-handlingSkill
- frontend-engineeringSkill
- git-workflowSkill
- goal-driven-executionSkill
- hallucination-preventionSkill
- idea-to-specSkill
- incremental-codingSkill
- integration-testingSkill
- meeting-notes-to-tasksSkill
- multi-agent-orchestrationSkill
- observabilitySkill
- performance-optimizationSkill
- production-deploymentSkill
- prompt-injection-defenseSkill
- rag-and-memorySkill
- refactoringSkill
- research-and-summarizeSkill
- security-hardeningSkill
- simplicity-firstSkill
- task-decompositionSkill
- test-driven-developmentSkill
- think-before-codingSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

