A Claude skill for implementing changes on a git repo (or a bare set of files) and delivering the result as verified git format-patch files you apply with git am.
Explicit only. Say "use git-patch-workflow" or invoke /git-patch-workflow. It does not fire on git URLs, PR links, or ordinary coding requests.
- Bootstrap — repo+ref (the anchor) or files-only baseline. Reuses your git identity (never overwrites it) and records the exact apply base.
- Sync —
git fetch+git rebaseonto the anchor; neverpullorreset --hard, so unpushed work survives. Handles PR-head and locally-prepared apply targets. - Implement — smallest diff that solves it, TDD where practical, one bisectable commit per change, docs updated in the same commit.
- Format & commit — repo/CI-declared tools first (Go:
gofumptonly if the project uses it); Conventional Commits, why-focused body, no AI attribution. - Verify (mandatory) — applies the patches to a detached worktree at the recorded base and runs the real checks (format, tests, build) before anything ships.
- Deliver — numbered
NNNN-subject.patchfiles plus the exactgit amcommand.
Per session. New/follow-up take the next number; a rework reuses the number with -v2/-v3 (rebuilt from the rejected commit's parent, old history kept on a backup branch); an abandoned change burns its number and leaves a gap.
Every delivered patch is verified against the exact state you apply onto. Uses git am (git apply silently drops hunks). Preserves your authorship and any unrelated working-tree changes. Asks instead of guessing when the target, mode, or fix is ambiguous.
for f in *.patch; do git am "$f"; doneKeep only one revision per patch number in the directory so the glob never applies duplicates.