Agent skill

gsd:reapply-patches

Reapply local modifications after a GSD update

Dave Poon3,251★ · 1 repos on radarProfile →
claude-codecan modify filesMIT
Install
npx skills add davepoon/buildwithclaude --skill reapply-patches --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 13 KB
Bundled scripts: none
Allowed tools: ReadWriteEditBashGlobGrepAskUserQuestion
Path: plugins/gsd/skills/reapply-patches/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 3,251
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

<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

What's inside
Steps it walks through
  1. Step 1: Detect backed-up patches
  2. Step 2: Determine baseline for three-way comparison
  3. Option A: Git history (most reliable)
  4. Option B: Pristine snapshot directory
  5. Option C: No baseline available (two-way fallback)
  6. Step 3: Show patch summary
  7. Step 4: Merge each file
  8. Three-way merge (when baseline is available)
  9. Two-way merge (fallback when no baseline)
  10. Git-enhanced two-way merge
  11. Post-merge verification
  12. Step 5: Hunk Verification Gate
  13. Step 6: Cleanup option
  14. Step 7: Report
Commands it runs
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
More from buildwithclaude
All skills →
About this skill
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.

Keep going