一键导入
gsd-reapply-patches
Reapply local modifications after a GSD update
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Reapply local modifications after a GSD update
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate tests for a completed phase based on UAT criteria and implementation
Archive completed milestone and prepare for next version
Create detailed phase plan (PLAN.md) with verification loop
Add phase to end of current milestone in roadmap
Capture idea or task as todo from current conversation context
Audit milestone completion against original intent before archiving
| name | gsd-reapply-patches |
| description | Reapply local modifications after a GSD update |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion |
Check for local patches directory:
# Global install (path templated at install time)
PATCHES_DIR={{PLATFORM_ROOT}}/gsd-local-patches
# Local install fallback
if [ ! -d "$PATCHES_DIR" ]; then
PATCHES_DIR={{PLATFORM_ROOT}}/gsd-local-patches
fi
Read backup-meta.json from the patches directory.
If no patches found:
No local patches found. Nothing to reapply.
Local patches are automatically saved when you run {{COMMAND_PREFIX}}update
after modifying any GSD workflow, command, or agent files.
Exit.
## Local Patches to Reapply
**Backed up from:** v{from_version}
**Current version:** {read VERSION file}
**Files modified:** {count}
| # | File | Status |
|---|------|--------|
| 1 | {file_path} | Pending |
| 2 | {file_path} | Pending |
For each file in backup-meta.json:
Read the backed-up version (user's modified copy from gsd-local-patches/)
Read the newly installed version (current file after update)
Compare and merge:
Merge strategy:
Write merged result to the installed location
Report status:
Merged — user modifications applied cleanlySkipped — modification already in upstreamConflict — user chose resolutionAfter reapplying, regenerate the file manifest so future updates correctly detect these as user modifications:
# The manifest will be regenerated on next {{COMMAND_PREFIX}}update
# For now, just note which files were modified
Ask user:
gsd-local-patches/gsd-local-patches/ directory## Patches Reapplied
| # | File | Status |
|---|------|--------|
| 1 | {file_path} | ✓ Merged |
| 2 | {file_path} | ○ Skipped (already upstream) |
| 3 | {file_path} | ⚠ Conflict resolved |
{count} file(s) updated. Your local modifications are active again.
<success_criteria>