speckit-updater – skill Khác cho agent AI
Cập nhật an toàn SpecKit
Cài skill speckit-updater bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/speckit-updater-ee3fc.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /speckit-updater – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/speckit-updater-ee3fc.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $speckit-updater – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/speckit-updater-ee3fc.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /speckit-updater – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/speckit-updater-ee3fc.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /speckit-updater – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Supporting material availability
This catalog copy contains the inline guidance below, but does not include the following supporting paths. They are external prerequisites, not bundled files:
scripts/update-wrapper.ps1(entry point)scripts/update-orchestrator.ps1(update implementation)
Ask for the original supporting material or an existing installation before using a step that depends on these paths; this catalog does not identify a verified download source for them. Resolve each path relative to that installation, inspect its contents, and verify any applicable license and execution prerequisites. Do not run a command or claim a referenced procedure was followed until its required file exists. Do not fabricate the missing scripts or treat an unrelated file with the same name as equivalent. Independent steps fully documented here can proceed within the user’s authorized scope; report any dependent step as unavailable.
SpecKit Safe Update
This skill provides safe update capabilities for GitHub SpecKit installations, preserving customizations while applying template updates.
Installation: Before adding any marketplace or manual clone, inspect the
exact plugin revision and every bundled file, report scripts and network or
filesystem behavior, and ask for explicit user approval. Do not install a moving
branch directly into an active agent directory.
When to Use
- You need to update or install SpecKit templates while preserving project customizations.
- You want a safe approval flow around update, rollback, or version-specific SpecKit operations.
- The task is to operate the SpecKit updater conversationally instead of running raw commands blindly.
What to do when this skill is invoked
When the user invokes /speckit-updater, you should:
1. Run the update orchestrator script without any flags (conversational mode):
pwsh -NoProfile -File "<skill_path>/scripts/update-wrapper.ps1"
2. Parse the output for markers:
[PROMPT_FOR_APPROVAL]- Update scenario (existing SpecKit installation)[PROMPT_FOR_INSTALL]- Fresh installation scenario (no .specify/ directory)
3. 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
-Proceedflag - If declined, inform the user the update was cancelled
4. 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
-Proceedflag to the user (this is an implementation detail) - If user approves (says "yes", "proceed", "install it", etc.), re-run with
-Proceedflag - If user declines, inform them the installation was cancelled
5. Execute approved action by re-running with -Proceed flag:
pwsh -NoProfile -File "<skill_path>/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
-Proceedflag 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:
1. Validates prerequisites (Git installed, clean Git state, write permissions)
2. Loads or creates manifest (.specify/manifest.json)
3. Fetches target version from GitHub Releases API
4. Compares file hashes to identify customizations
5. Creates timestamped backup
6. Applies selective updates preserving customized files
7. Opens VSCode merge editor for conflicts (Flow A: one at a time)
8. Automatically invokes /speckit.constitution for constitution updates
9. Updates manifest with new version
10. Manages backup retention (keeps last 5)
When you invoke this command, I will:
1. Execute the update-orchestrator.ps1 script
2. Parse output for markers ([PROMPT_FOR_APPROVAL] for updates, [PROMPT_FOR_INSTALL] for fresh installations)
3. For updates: Present Markdown summary of proposed changes
4. For installations: Ask naturally if you want to install SpecKit (without mentioning -Proceed flag)
5. Wait for your approval via chat conversation
6. After approval: automatically re-invoke with -Proceed flag to execute
7. Guide you through conflict resolution one file at a time (updates only)
8. Open VSCode diff/merge tools as needed (updates only)
9. 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.jsonwith 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-onlyshows 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
1. Prerequisites validation (critical checks must pass, warnings allow continuation)
2. Manifest loading/creation (safe default: assume all files customized if no manifest)
3. GitHub API query for target version
4. File state analysis (6 actions: add/remove/merge/preserve/update/skip)
5. User confirmation with change preview
6. Backup creation (timestamped, excludes backups directory)
7. Selective file updates (fail-fast with automatic rollback)
8. Conflict resolution (Flow A: one-a
… (nội dung đầy đủ có trong gói tải về)
Skill liên quan
- sred-project-organizer – Nhận danh sách dự án và tài liệu liên quan, rồi sắp xếp theo định dạng SRED để nộp hồ sơ.
- ssh-configuration – Cấu hình máy chủ và máy khách SSH an toàn. Quản lý khóa, đường hầm và tệp cấu hình. Dùng…
- ssl-tls-management – Quản lý chứng chỉ SSL/TLS với Let's Encrypt và PKI nội bộ. Cấu hình HTTPS an toàn, gia…
- stakeholder-investor-reports – Sổ đăng ký báo cáo bên liên quan: bên liên quan, kỳ báo cáo, chỉ số chính, người lập…
- startup-business-analyst-financial-projections – Lập mô hình tài chính chi tiết 3-5 năm với doanh thu, chi phí, dòng tiền và các kịch bản
- startup-it-troubleshooting – Sổ tay xử lý sự cố IT thực tế cho các nhóm nhỏ không có nhân sự IT chuyên trách.
- startup-metrics-framework – Hướng dẫn toàn diện về theo dõi, tính toán và tối ưu các chỉ số hiệu suất chính cho các…
- stellar-anchor-integration – Sổ đăng ký tuân thủ giao thức Stellar anchor: xác thực web SEP-10, nạp và rút tiền tương…