SpecKit Safe Update
This skill provides safe update capabilities for GitHub SpecKit installations, preserving customizations while applying template updates.
Installation: Available via plugin (/plugin marketplace add NotMyself/claude-plugins then /plugin install speckit-updater) or manual Git clone. See README.md for details.
What to do when this skill is invoked
When the user invokes /speckit-updater, you should:
Run the update orchestrator script without any flags (conversational mode):
pwsh -NoProfile -Command "& 'C:\Users\bobby\.claude\skills\speckit-updater\scripts\update-wrapper.ps1'"
Parse the output for markers:
[PROMPT_FOR_APPROVAL] - Update scenario (existing SpecKit installation)
[PROMPT_FOR_INSTALL] - Fresh installation scenario (no .specify/ directory)
For Updates ([PROMPT_FOR_APPROVAL] marker found):
- Present the Markdown summary showing:
- Current version vs. available version
- Files to update/add/remove
- Conflicts detected (if any)
- Files preserved (customized)
- Backup location
- Custom commands
- Ask the user for approval to proceed with the update
- If approved, re-run with
-Proceed flag
- If declined, inform the user the update was cancelled
For Fresh Installations ([PROMPT_FOR_INSTALL] marker found):
- Present a natural installation offer to the user, such as:
- "SpecKit is not currently installed in this project. Would you like me to install it?"
- "I can install the latest SpecKit templates for you. This will create the .specify/ directory structure and download the templates from GitHub."
- Do NOT mention the
-Proceed flag to the user (this is an implementation detail)
- If user approves (says "yes", "proceed", "install it", etc.), re-run with
-Proceed flag
- If user declines, inform them the installation was cancelled
Execute approved action by re-running with -Proceed flag:
pwsh -NoProfile -Command "& 'C:\Users\bobby\.claude\skills\speckit-updater\scripts\update-wrapper.ps1' -Proceed"
Special cases:
- If user requests
-CheckOnly: run with that flag and show the report
- If user requests
-Rollback: run with that flag and confirm restoration
- If user requests specific
-Version: include that parameter
Commands
/speckit-updater
Updates SpecKit templates, commands, and scripts while preserving customizations.
Usage:
/speckit-updater - Interactive update/install with conversational approval workflow (recommended for Claude Code)
/speckit-updater -Proceed - Proceed with update/install after approval (used by Claude after user confirms)
/speckit-updater -CheckOnly - Check for updates without applying
/speckit-updater -Version v0.0.72 - Update to specific version
/speckit-updater -Force - Force overwrite SpecKit files (preserves custom commands)
/speckit-updater -Rollback - Restore from previous backup
/speckit-updater -Auto - DEPRECATED: Use conversational workflow instead (shows warning, maps to -Proceed)
Fresh Installation (No .specify/ directory):
- First invocation shows installation offer with
[PROMPT_FOR_INSTALL] marker
- Claude Code presents natural question to user (e.g., "Would you like me to install SpecKit?")
- User approves via conversational response (e.g., "yes", "proceed", "install it")
- Claude re-invokes with
-Proceed flag automatically (implementation detail hidden from user)
- Script creates
.specify/ structure, downloads templates, creates manifest
- Exit code 0 throughout (awaiting approval is not an error)
- Consistent with update flow: both use conversational approval workflow
Process:
- Validates prerequisites (Git installed, clean Git state, write permissions)
- Loads or creates manifest (.specify/manifest.json)
- Fetches target version from GitHub Releases API
- Compares file hashes to identify customizations
- Creates timestamped backup
- Applies selective updates preserving customized files
- Opens VSCode merge editor for conflicts (Flow A: one at a time)
- Automatically invokes /speckit.constitution for constitution updates
- Updates manifest with new version
- Manages backup retention (keeps last 5)
When you invoke this command, I will:
- Execute the update-orchestrator.ps1 script
- Parse output for markers (
[PROMPT_FOR_APPROVAL] for updates, [PROMPT_FOR_INSTALL] for fresh installations)
- For updates: Present Markdown summary of proposed changes
- For installations: Ask naturally if you want to install SpecKit (without mentioning
-Proceed flag)
- Wait for your approval via chat conversation
- After approval: automatically re-invoke with
-Proceed flag to execute
- Guide you through conflict resolution one file at a time (updates only)
- Open VSCode diff/merge tools as needed (updates only)
- Report results with detailed summary
Conversational Workflow: The skill uses a two-step approval process:
- Step 1: Outputs summary → script exits → waits for approval
- Step 2: After approval, Claude re-invokes with
-Proceed → applies updates
Requirements:
- Git installed and in PATH
- Internet connection for fetching updates from GitHub
- Write permissions to .specify/ and .claude/ directories
- Clean or staged Git working directory
The script is located at: {skill_path}/scripts/update-wrapper.ps1 (entry point) and {skill_path}/scripts/update-orchestrator.ps1 (main logic)
Entry point command:
pwsh -NoProfile -Command "& '{skill_path}/scripts/update-wrapper.ps1' [parameters]"
Note: Both PowerShell-style (-CheckOnly) and Linux-style (--check-only) flags are supported via the wrapper script.
Features
- Customization Preservation: Automatically detects and preserves user customizations using normalized file hashing
- Intelligent Conflict Resolution: Guides through conflicts one-at-a-time with 4 options: merge editor, keep mine, use new, skip
- Version Tracking: Maintains
.specify/manifest.json with file hashes, version info, and backup history
- Automatic Backups: Creates timestamped backups in
.specify/backups/ with automatic retention management
- Fail-Fast with Rollback: Automatically rolls back on any error, restoring pre-update state
- Dry-Run Mode:
--check-only shows exactly what would change without applying updates
- Constitution Integration: Notifies when constitution template has updates (run
/speckit.constitution)
- Custom Command Safety: User-created commands never overwritten, even with
--force
Architecture
Modules
- HashUtils: Normalized hashing (handles line endings, trailing whitespace, BOM)
- VSCodeIntegration: Context detection, Quick Pick, diff/merge editor integration
- GitHubApiClient: GitHub Releases API interaction (unauthenticated, 60 req/hour)
- ManifestManager: Manifest CRUD operations with caching
- BackupManager: Backup creation, restoration, and retention management
- ConflictDetector: File state analysis and conflict detection
Workflow
- Prerequisites validation (critical checks must pass, warnings allow continuation)
- Manifest loading/creation (safe default: assume all files customized if no manifest)
- GitHub API query for target version
- File state analysis (6 actions: add/remove/merge/preserve/update/skip)
- User confirmation with change preview
- Backup creation (timestamped, excludes backups directory)
- Selective file updates (fail-fast with automatic rollback)
- Conflict resolution (Flow A: one-at-a-time, VSCode merge editor)
- Manifest update (version, file hashes, customization flags)
- Backup cleanup (keep 5 most recent, requires confirmation)
- Detailed summary display
Exit Codes
| Code |
Meaning |
| 0 |
Success |
| 1 |
General error |
| 2 |
Prerequisites not met |
| 3 |
Network/API error |
| 4 |
Git error |
| 5 |
User cancelled |
| 6 |
Rollback required (automatic) |
1---2name: claude-win11-speckit-update-skill3description: SpecKit Safe Update4---5# SpecKit Safe Update67This skill provides safe update capabilities for GitHub SpecKit installations, preserving customizations while applying template updates.89**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.1011## What to do when this skill is invoked1213When the user invokes `/speckit-updater`, you should:14151. **Run the update orchestrator script** without any flags (conversational mode):16 ```powershell17 pwsh -NoProfile -Command "& 'C:\Users\bobby\.claude\skills\speckit-updater\scripts\update-wrapper.ps1'"18 ```19202. **Parse the output** for markers:21 - **`[PROMPT_FOR_APPROVAL]`** - Update scenario (existing SpecKit installation)22 - **`[PROMPT_FOR_INSTALL]`** - Fresh installation scenario (no .specify/ directory)23243. **For Updates** (`[PROMPT_FOR_APPROVAL]` marker found):25 - **Present the Markdown summary** showing:26 - Current version vs. available version27 - Files to update/add/remove28 - Conflicts detected (if any)29 - Files preserved (customized)30 - Backup location31 - Custom commands32 - **Ask the user for approval** to proceed with the update33 - **If approved**, re-run with `-Proceed` flag34 - **If declined**, inform the user the update was cancelled35364. **For Fresh Installations** (`[PROMPT_FOR_INSTALL]` marker found):37 - **Present a natural installation offer** to the user, such as:38 - "SpecKit is not currently installed in this project. Would you like me to install it?"39 - "I can install the latest SpecKit templates for you. This will create the .specify/ directory structure and download the templates from GitHub."40 - **Do NOT mention the `-Proceed` flag** to the user (this is an implementation detail)41 - **If user approves** (says "yes", "proceed", "install it", etc.), re-run with `-Proceed` flag42 - **If user declines**, inform them the installation was cancelled43445. **Execute approved action** by re-running with `-Proceed` flag:45 ```powershell46 pwsh -NoProfile -Command "& 'C:\Users\bobby\.claude\skills\speckit-updater\scripts\update-wrapper.ps1' -Proceed"47 ```4849**Special cases:**50- If user requests `-CheckOnly`: run with that flag and show the report51- If user requests `-Rollback`: run with that flag and confirm restoration52- If user requests specific `-Version`: include that parameter5354## Commands5556### /speckit-updater5758Updates SpecKit templates, commands, and scripts while preserving customizations.5960**Usage:**61- `/speckit-updater` - Interactive update/install with conversational approval workflow (recommended for Claude Code)62- `/speckit-updater -Proceed` - Proceed with update/install after approval (used by Claude after user confirms)63- `/speckit-updater -CheckOnly` - Check for updates without applying64- `/speckit-updater -Version v0.0.72` - Update to specific version65- `/speckit-updater -Force` - Force overwrite SpecKit files (preserves custom commands)66- `/speckit-updater -Rollback` - Restore from previous backup67- `/speckit-updater -Auto` - DEPRECATED: Use conversational workflow instead (shows warning, maps to -Proceed)6869**Fresh Installation (No .specify/ directory):**70- First invocation shows installation offer with `[PROMPT_FOR_INSTALL]` marker71- Claude Code presents natural question to user (e.g., "Would you like me to install SpecKit?")72- User approves via conversational response (e.g., "yes", "proceed", "install it")73- Claude re-invokes with `-Proceed` flag automatically (implementation detail hidden from user)74- Script creates `.specify/` structure, downloads templates, creates manifest75- Exit code 0 throughout (awaiting approval is not an error)76- Consistent with update flow: both use conversational approval workflow7778**Process:**791. Validates prerequisites (Git installed, clean Git state, write permissions)802. Loads or creates manifest (.specify/manifest.json)813. Fetches target version from GitHub Releases API824. Compares file hashes to identify customizations835. Creates timestamped backup846. Applies selective updates preserving customized files857. Opens VSCode merge editor for conflicts (Flow A: one at a time)868. Automatically invokes /speckit.constitution for constitution updates879. Updates manifest with new version8810. Manages backup retention (keeps last 5)8990**When you invoke this command, I will:**911. Execute the update-orchestrator.ps1 script922. Parse output for markers (`[PROMPT_FOR_APPROVAL]` for updates, `[PROMPT_FOR_INSTALL]` for fresh installations)933. **For updates**: Present Markdown summary of proposed changes944. **For installations**: Ask naturally if you want to install SpecKit (without mentioning `-Proceed` flag)955. Wait for your approval via chat conversation966. After approval: automatically re-invoke with `-Proceed` flag to execute977. Guide you through conflict resolution one file at a time (updates only)988. Open VSCode diff/merge tools as needed (updates only)999. Report results with detailed summary100101**Conversational Workflow:** The skill uses a two-step approval process:102- **Step 1**: Outputs summary → script exits → waits for approval103- **Step 2**: After approval, Claude re-invokes with `-Proceed` → applies updates104105**Requirements:**106- Git installed and in PATH107- Internet connection for fetching updates from GitHub108- Write permissions to .specify/ and .claude/ directories109- Clean or staged Git working directory110111**The script is located at:** `{skill_path}/scripts/update-wrapper.ps1` (entry point) and `{skill_path}/scripts/update-orchestrator.ps1` (main logic)112113**Entry point command:**114```powershell115pwsh -NoProfile -Command "& '{skill_path}/scripts/update-wrapper.ps1' [parameters]"116```117118**Note:** Both PowerShell-style (`-CheckOnly`) and Linux-style (`--check-only`) flags are supported via the wrapper script.119120## Features121122- **Customization Preservation**: Automatically detects and preserves user customizations using normalized file hashing123- **Intelligent Conflict Resolution**: Guides through conflicts one-at-a-time with 4 options: merge editor, keep mine, use new, skip124- **Version Tracking**: Maintains `.specify/manifest.json` with file hashes, version info, and backup history125- **Automatic Backups**: Creates timestamped backups in `.specify/backups/` with automatic retention management126- **Fail-Fast with Rollback**: Automatically rolls back on any error, restoring pre-update state127- **Dry-Run Mode**: `--check-only` shows exactly what would change without applying updates128- **Constitution Integration**: Notifies when constitution template has updates (run `/speckit.constitution`)129- **Custom Command Safety**: User-created commands never overwritten, even with `--force`130131## Architecture132133### Modules134- **HashUtils**: Normalized hashing (handles line endings, trailing whitespace, BOM)135- **VSCodeIntegration**: Context detection, Quick Pick, diff/merge editor integration136- **GitHubApiClient**: GitHub Releases API interaction (unauthenticated, 60 req/hour)137- **ManifestManager**: Manifest CRUD operations with caching138- **BackupManager**: Backup creation, restoration, and retention management139- **ConflictDetector**: File state analysis and conflict detection140141### Workflow1421. Prerequisites validation (critical checks must pass, warnings allow continuation)1432. Manifest loading/creation (safe default: assume all files customized if no manifest)1443. GitHub API query for target version1454. File state analysis (6 actions: add/remove/merge/preserve/update/skip)1465. User confirmation with change preview1476. Backup creation (timestamped, excludes backups directory)1487. Selective file updates (fail-fast with automatic rollback)1498. Conflict resolution (Flow A: one-at-a-time, VSCode merge editor)1509. Manifest update (version, file hashes, customization flags)15110. Backup cleanup (keep 5 most recent, requires confirmation)15211. Detailed summary display153154## Exit Codes155156| Code | Meaning |157|------|---------|158| 0 | Success |159| 1 | General error |160| 2 | Prerequisites not met |161| 3 | Network/API error |162| 4 | Git error |163| 5 | User cancelled |164| 6 | Rollback required (automatic) |