Safe updates for GitHub SpecKit installations, preserving your customizations. This Claude Code skill provides a safe, automated way to update SpecKit templates, commands, and scripts while preserving user customizations, eliminating the need for destructive specify init --force updates. - Smart Merge with Frictionless Onboarding (New in v0.6.0): Automatic version detection and intelligent 3-way m
Add this skill
npx mdskills install NotMyself/speckit-updaterComprehensive safe-update workflow with excellent conflict resolution and conversational approval flow
1# SpecKit Safe Update23This skill provides safe update capabilities for GitHub SpecKit installations, preserving customizations while applying template updates.45**Installation**: Available via plugin (`/plugin marketplace add NotMyself/claude-plugins` then `/plugin install speckit-updater`) or manual Git clone. See [README.md](../../README.md#installation) for details.67## What to do when this skill is invoked89When the user invokes `/speckit-updater`, you should:10111. **Run the update orchestrator script** without any flags (conversational mode):12 ```powershell13 pwsh -NoProfile -Command "& 'C:\Users\bobby\.claude\skills\speckit-updater\scripts\update-wrapper.ps1'"14 ```15162. **Parse the output** for markers:17 - **`[PROMPT_FOR_APPROVAL]`** - Update scenario (existing SpecKit installation)18 - **`[PROMPT_FOR_INSTALL]`** - Fresh installation scenario (no .specify/ directory)19203. **For Updates** (`[PROMPT_FOR_APPROVAL]` marker found):21 - **Present the Markdown summary** showing:22 - Current version vs. available version23 - Files to update/add/remove24 - Conflicts detected (if any)25 - Files preserved (customized)26 - Backup location27 - Custom commands28 - **Ask the user for approval** to proceed with the update29 - **If approved**, re-run with `-Proceed` flag30 - **If declined**, inform the user the update was cancelled31324. **For Fresh Installations** (`[PROMPT_FOR_INSTALL]` marker found):33 - **Present a natural installation offer** to the user, such as:34 - "SpecKit is not currently installed in this project. Would you like me to install it?"35 - "I can install the latest SpecKit templates for you. This will create the .specify/ directory structure and download the templates from GitHub."36 - **Do NOT mention the `-Proceed` flag** to the user (this is an implementation detail)37 - **If user approves** (says "yes", "proceed", "install it", etc.), re-run with `-Proceed` flag38 - **If user declines**, inform them the installation was cancelled39405. **Execute approved action** by re-running with `-Proceed` flag:41 ```powershell42 pwsh -NoProfile -Command "& 'C:\Users\bobby\.claude\skills\speckit-updater\scripts\update-wrapper.ps1' -Proceed"43 ```4445**Special cases:**46- If user requests `-CheckOnly`: run with that flag and show the report47- If user requests `-Rollback`: run with that flag and confirm restoration48- If user requests specific `-Version`: include that parameter4950## Commands5152### /speckit-updater5354Updates SpecKit templates, commands, and scripts while preserving customizations.5556**Usage:**57- `/speckit-updater` - Interactive update/install with conversational approval workflow (recommended for Claude Code)58- `/speckit-updater -Proceed` - Proceed with update/install after approval (used by Claude after user confirms)59- `/speckit-updater -CheckOnly` - Check for updates without applying60- `/speckit-updater -Version v0.0.72` - Update to specific version61- `/speckit-updater -Force` - Force overwrite SpecKit files (preserves custom commands)62- `/speckit-updater -Rollback` - Restore from previous backup63- `/speckit-updater -Auto` - DEPRECATED: Use conversational workflow instead (shows warning, maps to -Proceed)6465**Fresh Installation (No .specify/ directory):**66- First invocation shows installation offer with `[PROMPT_FOR_INSTALL]` marker67- Claude Code presents natural question to user (e.g., "Would you like me to install SpecKit?")68- User approves via conversational response (e.g., "yes", "proceed", "install it")69- Claude re-invokes with `-Proceed` flag automatically (implementation detail hidden from user)70- Script creates `.specify/` structure, downloads templates, creates manifest71- Exit code 0 throughout (awaiting approval is not an error)72- Consistent with update flow: both use conversational approval workflow7374**Process:**751. Validates prerequisites (Git installed, clean Git state, write permissions)762. Loads or creates manifest (.specify/manifest.json)773. Fetches target version from GitHub Releases API784. Compares file hashes to identify customizations795. Creates timestamped backup806. Applies selective updates preserving customized files817. Opens VSCode merge editor for conflicts (Flow A: one at a time)828. Automatically invokes /speckit.constitution for constitution updates839. Updates manifest with new version8410. Manages backup retention (keeps last 5)8586**When you invoke this command, I will:**871. Execute the update-orchestrator.ps1 script882. Parse output for markers (`[PROMPT_FOR_APPROVAL]` for updates, `[PROMPT_FOR_INSTALL]` for fresh installations)893. **For updates**: Present Markdown summary of proposed changes904. **For installations**: Ask naturally if you want to install SpecKit (without mentioning `-Proceed` flag)915. Wait for your approval via chat conversation926. After approval: automatically re-invoke with `-Proceed` flag to execute937. Guide you through conflict resolution one file at a time (updates only)948. Open VSCode diff/merge tools as needed (updates only)959. Report results with detailed summary9697**Conversational Workflow:** The skill uses a two-step approval process:98- **Step 1**: Outputs summary → script exits → waits for approval99- **Step 2**: After approval, Claude re-invokes with `-Proceed` → applies updates100101**Requirements:**102- Git installed and in PATH103- Internet connection for fetching updates from GitHub104- Write permissions to .specify/ and .claude/ directories105- Clean or staged Git working directory106107**The script is located at:** `{skill_path}/scripts/update-wrapper.ps1` (entry point) and `{skill_path}/scripts/update-orchestrator.ps1` (main logic)108109**Entry point command:**110```powershell111pwsh -NoProfile -Command "& '{skill_path}/scripts/update-wrapper.ps1' [parameters]"112```113114**Note:** Both PowerShell-style (`-CheckOnly`) and Linux-style (`--check-only`) flags are supported via the wrapper script.115116## Features117118- **Customization Preservation**: Automatically detects and preserves user customizations using normalized file hashing119- **Intelligent Conflict Resolution**: Guides through conflicts one-at-a-time with 4 options: merge editor, keep mine, use new, skip120- **Version Tracking**: Maintains `.specify/manifest.json` with file hashes, version info, and backup history121- **Automatic Backups**: Creates timestamped backups in `.specify/backups/` with automatic retention management122- **Fail-Fast with Rollback**: Automatically rolls back on any error, restoring pre-update state123- **Dry-Run Mode**: `--check-only` shows exactly what would change without applying updates124- **Constitution Integration**: Notifies when constitution template has updates (run `/speckit.constitution`)125- **Custom Command Safety**: User-created commands never overwritten, even with `--force`126127## Architecture128129### Modules130- **HashUtils**: Normalized hashing (handles line endings, trailing whitespace, BOM)131- **VSCodeIntegration**: Context detection, Quick Pick, diff/merge editor integration132- **GitHubApiClient**: GitHub Releases API interaction (unauthenticated, 60 req/hour)133- **ManifestManager**: Manifest CRUD operations with caching134- **BackupManager**: Backup creation, restoration, and retention management135- **ConflictDetector**: File state analysis and conflict detection136137### Workflow1381. Prerequisites validation (critical checks must pass, warnings allow continuation)1392. Manifest loading/creation (safe default: assume all files customized if no manifest)1403. GitHub API query for target version1414. File state analysis (6 actions: add/remove/merge/preserve/update/skip)1425. User confirmation with change preview1436. Backup creation (timestamped, excludes backups directory)1447. Selective file updates (fail-fast with automatic rollback)1458. Conflict resolution (Flow A: one-at-a-time, VSCode merge editor)1469. Manifest update (version, file hashes, customization flags)14710. Backup cleanup (keep 5 most recent, requires confirmation)14811. Detailed summary display149150## Exit Codes151152| Code | Meaning |153|------|---------|154| 0 | Success |155| 1 | General error |156| 2 | Prerequisites not met |157| 3 | Network/API error |158| 4 | Git error |159| 5 | User cancelled |160| 6 | Rollback required (automatic) |161
Full transparency — inspect the skill content before installing.