patch
Installation
SKILL.md
Patch
Intent
Carve changes into surgical git patch files: one coherent change, minimal blast radius, and at least one feedback signal before exporting.
This skill treats a patch as a transport artifact (a context-sensitive diff), not a magical commutative "merge atom". The goal is to make patches small, reviewable, and maximally likely to apply cleanly.
Mental model (why this is harder than it looks)
- A git patch file is a procedure over a base: it is not commutative, not associative, and not idempotent in general.
- Patch-based VCSes (Darcs/Pijul) work hard to make patch application order-independent; git-style patches don't promise that.
- Therefore: always be explicit about the intended base (usually
HEAD), keep patches tiny, and validate against a clean base.
When to use
- "Split this into micro patches."
- "Stage only the minimal change and make a patch file."
- "Keep the patch tiny, keep checks passing."