一键导入
release
Release a new version - auto-detect bump type, tag, commit, push and create GitHub Release to trigger npm publish (project)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Release a new version - auto-detect bump type, tag, commit, push and create GitHub Release to trigger npm publish (project)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | release |
| description | Release a new version - auto-detect bump type, tag, commit, push and create GitHub Release to trigger npm publish (project) |
| user-invocable | true |
| allowed-tools | Bash, Read, Edit |
Automates the release process for the xhs-mcp package with intelligent version detection.
Analyze changes since the last tag to determine version bump:
src/tools/npm installWhen the user invokes /release:
Get current version and last tag:
node -p "require('./package.json').version"
git describe --tags --abbrev=0 2>/dev/null || echo "none"
Get commit messages since last tag:
git log $(git describe --tags --abbrev=0 2>/dev/null || echo "HEAD~10")..HEAD --oneline
Analyze the commits and determine version bump:
Calculate new version:
Update package.json using Edit tool
Sync package-lock.json (IMPORTANT - prevents CI failures):
npm install
Commit and tag:
git add package.json package-lock.json
git commit -m "chore: release v{NEW_VERSION}
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>"
git tag v{NEW_VERSION}
Push:
git push && git push --tags
Create GitHub Release (triggers npm publish workflow):
gh release create v{NEW_VERSION} --title "v{NEW_VERSION}" --notes "{RELEASE_NOTES}"
Report results:
Changes detected: {summary}
Version bump: {type} ({old} → {new})
✓ Updated package.json
✓ Synced package-lock.json
✓ Committed: chore: release v{new}
✓ Tagged: v{new}
✓ Pushed to remote
✓ GitHub Release created
npm publish workflow triggered: https://github.com/ShunL12324/xhs-mcp/actions
Analyzing changes since v1.0.0...
Commits:
- feat: add xhs_publish_video tool
- fix: handle empty search results
- chore: update dependencies
Detected: New feature added (feat:)
Version bump: minor (1.0.0 → 1.1.0)
✓ Updated package.json
✓ Synced package-lock.json
✓ Committed: chore: release v1.1.0
✓ Tagged: v1.1.0
✓ Pushed to remote
✓ GitHub Release created
npm publish workflow triggered: https://github.com/ShunL12324/xhs-mcp/actions
npm ci fails in GitHub ActionsThis happens when package-lock.json is out of sync with package.json. The workflow now includes npm install step to prevent this.
If a release fails and needs to be retried:
gh release delete v{VERSION} --yes
git tag -d v{VERSION}
git push origin :refs/tags/v{VERSION}
# Then re-run the release process