gsd-reapply-patches

Merge local patch backups into newly installed GSD files after updates.

Updated Jan 28, 2025
One-click install
npx skills add https://github.com/aslaii/dotfiles --skill gsd-reapply-patches-aslaii
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsd-reapply-patches
Source: https://github.com/aslaii/dotfiles/tree/main/claude/skills/gsd-reapply-patches
Command: npx skills add https://github.com/aslaii/dotfiles --skill gsd-reapply-patches-aslaii

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

After a GSD update wipes and reinstalls files, this tool merges the user's previously saved local modifications back into the new version. It uses a three-way comparison (pristine baseline, user-modified backup, newly installed version) to reliably distinguish user customizations from version drift and to prevent a false "no custom content" conclusion. When in doubt, it classifies as CONFLICT requiring user review, not SKIP.

Core Features & Use Cases

  • Detects backed-up patches saved in gsd-local-patches and reads backup-meta.json to identify files to reapply.
  • Determines a baseline using git history if available or gsd-pristine snapshots; performs three-way merges or strengthened two-way merges when baseline is missing.
  • Enforces safety checks, reports conflicts, and provides post-merge verification guidance to ensure user modifications are preserved.

Quick Start

Run the gsd-reapply-patches workflow to begin merging your local modifications after a GSD update.

Frequently Asked Questions about gsd-reapply-patches

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reapply local modifications after a GSD update overwrites my files?

To reapply local modifications after a GSD update overwrites your files, this Skill merges your user-modified backups with the newly installed version. It reads backup-meta.json and uses three-way merges to reliably distinguish your customizations from version drift.

How does three-way merge work for preserving dotfiles and local patches?

Three-way merge for preserving dotfiles works by comparing a pristine baseline, your user-modified backup, and the newly installed version. This comparison reliably distinguishes your local patches from version drift to ensure custom content is preserved accurately.

What happens when there is no pristine baseline available for a three-way merge?

When no pristine baseline exists for a three-way merge, the process falls back to enhanced two-way heuristics. It strengthens the comparison logic to protect user changes and classifies uncertain modifications as conflicts requiring user review rather than skipping them.

Can I use Git history to determine the baseline for merging local patches?

You can use Git history to determine the baseline for merging local patches. The Skill determines the baseline using Git history if available, or falls back to gsd-pristine snapshots, to compute accurate merges and enforce safety checks.

Why does the patch reapplication process report conflicts instead of skipping files?

The patch reapplication process reports conflicts instead of skipping files to prevent a false conclusion that no custom content exists. When in doubt, it enforces verification and classifies uncertain modifications as conflicts requiring user review to protect user changes.

Do I need gsd-local-patches backups before running a reapply patches workflow?

You need gsd-local-patches backups containing your saved local modifications and backup-meta.json before running the workflow. The Skill detects these backed-up patches to identify which files to reapply after a GSD update wipes and reinstalls your environment.