Surgical Patcher

Apply changes to existing source files by anchored, verified, reversible patches instead of rewriting whole files. Use this whenever you are about to edit, refactor, or modify an existing file programmatically; when applying a patch, diff, or change set proposed by an auditor or another model; when doing find-and-replace across a repo; or any time you would otherwise overwrite a file from memory or from a snapshot. This is especially important in AI-assisted coding, where the single largest source of silent regressions is a model rewriting more than it intended. Push to use this even when the user just says "edit this file", "apply this fix", "refactor X", or "the audit found a problem in Y".

annatchijova Updated

File contents

annatchijova/SKILLS/tree/main/surgical-patcher commit 3d2cc126aa

Frequently asked questions

npx skillmds@latest add annatchijova/surgical-patcher