Surgical Coding
Use this skill for non-trivial code edits, bug fixes, refactors, tests, reviews, and repo-grounded implementation.
Workflow
- State assumptions when the request is ambiguous. If ambiguity changes the implementation materially, ask before editing.
- Read before writing: inspect relevant exports, immediate callers, tests, shared utilities, and nearby conventions.
- Make the smallest change that solves the requested problem.
- Avoid speculative abstraction, configurability, or unrelated cleanup.
- Match the codebase's conventions, even when another style seems preferable.
- Verify with tests, typecheck, lint, runtime checks, screenshots, or targeted reproduction according to task risk.
- 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.