# Surgical Coding

> Use for non-trivial code edits, bug fixes, refactors, tests, reviews, and repo-grounded implementation. Emphasizes reading before writing, surgical scope, local conventions, and narrow verification.

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

---


# Surgical Coding

Use this skill for non-trivial code edits, bug fixes, refactors, tests, reviews, and repo-grounded implementation.

## Workflow

1. State assumptions when the request is ambiguous. If ambiguity changes the implementation materially, ask before editing.
2. Read before writing: inspect relevant exports, immediate callers, tests, shared utilities, and nearby conventions.
3. Make the smallest change that solves the requested problem.
4. Avoid speculative abstraction, configurability, or unrelated cleanup.
5. Match the codebase's conventions, even when another style seems preferable.
6. Verify with tests, typecheck, lint, runtime checks, screenshots, or targeted reproduction according to task risk.
7. Report skipped checks, uncertainty, and residual risk clearly.

## Guardrails

- Every changed line should trace to the user's request.
- Remove only unused code introduced by your change.
- Do not delete or rewrite unrelated existing hooks, config, code, comments, or formatting.
- If two local patterns conflict, choose the more recent or better-tested pattern and name the conflict.

