npx skills add davepoon/buildwithclaude --skill reapply-patches --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
<purpose> After a GSD update wipes and reinstalls files, this command merges user's previously saved local modifications back into the new version. Uses three-way comparison (pristine baseline, user-modified backup, newly installed version) to reliably distinguish user customizations from version drift. **Critical invariant:** Every file in `gsd-local-patches/` was backed up because the installer's hash comparison detected it was modified. The workflow must NEVER conclude "no custom content" for any backed-up file — that is a logical contradiction. When in doubt, classify as CONFLICT requiring user review, not SKIP. </purpose> <process> ## Step 1: Detect backed-up patches Check for local patches directory: ```bash expand_home() { case "$1" in "~/"*) printf '%s/%s\n' "$HOME" "${1#~/}" ;; *) printf '%s\n' "$1" ;; esac } PATCHES_DIR="" # Env overrides first — covers custom config directories used with --config-dir if [ -n "$KILO_CONFIG_DIR" ]; then candidate="$(expand_home "$KILO_CONFIG_DIR")/gsd-local-patches" if [ -d "$candidate" ]; then PATCHES_DIR="$candidate" fi elif [ -n "$KILO_CONFIG" ]; then candidate="$(dirname "$(expand_home "$KILO_CONFIG")")/gsd-local-patches" if [ -d "$can
- Step 1: Detect backed-up patches
- Step 2: Determine baseline for three-way comparison
- Option A: Git history (most reliable)
- Option B: Pristine snapshot directory
- Option C: No baseline available (two-way fallback)
- Step 3: Show patch summary
- Step 4: Merge each file
- Three-way merge (when baseline is available)
- Two-way merge (fallback when no baseline)
- Git-enhanced two-way merge
- Post-merge verification
- Step 5: Hunk Verification Gate
- Step 6: Cleanup option
- Step 7: Report
case "$1" in esac Env overrides first — covers custom config directories used with --config-dir if [ -n "$KILO_CONFIG_DIR" ]; then if [ -d "$candidate" ]; then fi elif [ -n "$KILO_CONFIG" ]; then elif [ -n "$XDG_CONFIG_HOME" ]; then if [ -z "$PATCHES_DIR" ] && [ -n "$OPENCODE_CONFIG_DIR" ]; then elif [ -z "$PATCHES_DIR" ] && [ -n "$OPENCODE_CONFIG" ]; then
What does the gsd:reapply-patches skill do?
Reapply local modifications after a GSD update
How do I install it?
Run `npx skills add davepoon/buildwithclaude --skill reapply-patches --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From davepoon/buildwithclaude, a repository with 3,251 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.