ai-output-validation
Validates, parses, and sanitizes AI-generated outputs before they reach end users or downstream systems. Structured output enforcement, schema validation, and…
Enforces minimal code modifications — touch only what you must. Prevents drive-by refactoring, comment deletions, and style changes unrelated to the task.
$ npx -y skills add DevelopersGlobal/ai-agent-skills --skill surgical-changes --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/surgical-changesContext preview
The summary Claude sees to decide when to auto-load this skill.
Enforces minimal code modifications — touch only what you must. Prevents drive-by refactoring, comment deletions, and style changes unrelated to the task.
name: surgical-changes description: Enforces minimal code modifications — touch only what you must. Prevents drive-by refactoring, comment deletions, and style changes unrelated to the task. category: build applies-to: [claude, gemini, cursor, copilot, any] version: 1.0.0
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.**
1. Read the task carefully. Write down exactly which files and functions need to change. 2. Draw a mental boundary: *"Everything outside this boundary is out of scope."* 3. List what you will NOT change, even if you'd do it differently:
**Verify:** You can name the specific functions/lines that need to change.
4. Make the changes — and only the changes — within the defined boundary. 5. If you notice something wrong outside the boundary:
6. 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.
7. Read through your diff line by line. 8. For each changed line, ask: *"Why did I change this?"*
9. 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.
10. In your PR/commit message, explicitly note what you chose NOT to change and why:
| 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. |
AI agent skills for production grade applications
Validates, parses, and sanitizes AI-generated outputs before they reach end users or downstream systems. Structured output enforcement, schema validation, and…
Design stable, versioned, self-documenting APIs. Easy to use correctly, hard to use incorrectly. Apply Hyrum's Law from day one.
Automated quality gates from commit to production. Every merge to main is potentially shippable. No manual steps in the deployment path.
Get layered, context-aware explanations of unfamiliar code. Understand what it does, why it was written that way, and how to work with it safely.
Structured code review focusing on correctness, security, and maintainability. Correctness before style. Every reviewer comment must be actionable.
Load minimum necessary context into agent context windows. Prevents token bloat, reduces cost, and improves focus. Only load what the current task needs.