nav-release

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Navigator Release Skill

Navigator 发布Skill

Validate plugin integrity and release to marketplace with all safety checks.
验证插件完整性并通过所有安全检查后发布至插件市场。

Why This Exists

设计缘由

After v5.1.0 incident where nav-profile was referenced in plugin.json but never committed, causing install failures. This skill ensures:
  • All referenced skills exist and are committed
  • Version consistency across all files
  • Tag created AFTER all commits
  • Post-release verification
在v5.1.0版本事故中,plugin.json中引用了nav-profile但从未提交,导致安装失败。本Skill确保:
  • 所有被引用的Skill均已存在且已提交
  • 所有文件中的版本保持一致
  • 在所有提交完成后再创建标签
  • 发布后进行验证

When to Invoke

触发时机

Auto-invoke when:
  • User says "release plugin", "publish navigator"
  • User says "create release", "deploy new version"
  • User says "release vX.Y.Z"
DO NOT invoke if:
  • Just committing changes (no release)
  • Updating documentation only
  • Testing locally
自动触发场景
  • 用户说出“release plugin”、“publish navigator”
  • 用户说出“create release”、“deploy new version”
  • 用户说出“release vX.Y.Z”
请勿触发场景
  • 仅提交更改(不发布版本)
  • 仅更新文档
  • 本地测试

Execution Steps

执行步骤

Step 1: Pre-Release Validation [CRITICAL]

步骤1:发布前验证 [关键步骤]

Run validation script:
bash
python3 functions/release_validator.py --check-all
This validates:
  1. All skills in plugin.json exist
  2. All skill files are committed (not untracked)
  3. Version consistency across files
  4. No uncommitted changes in skills/
If validation fails: STOP and fix issues before proceeding.
运行验证脚本
bash
python3 functions/release_validator.py --check-all
该脚本会验证:
  1. plugin.json中列出的所有Skill均存在
  2. 所有Skill文件均已提交(无未追踪文件)
  3. 所有文件中的版本保持一致
  4. skills/目录下无未提交的更改
若验证失败:停止流程,修复问题后再继续。

Step 2: Display Validation Results

步骤2:展示验证结果

Show validation summary:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NAVIGATOR RELEASE VALIDATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Skills Check:
  [x] nav-loop          ✓ exists, committed
  [x] nav-profile       ✓ exists, committed
  [x] nav-diagnose      ✓ exists, committed
  ...

Version Check:
  plugin.json:      5.1.0 ✓
  marketplace.json: 5.1.0 ✓
  CLAUDE.md:        5.1.0 ✓
  README.md:        5.1.0 ✓

Git Status:
  Uncommitted skills: 0 ✓
  Untracked skills:   0 ✓

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
VALIDATION: PASSED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
显示验证摘要:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NAVIGATOR RELEASE VALIDATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Skills Check:
  [x] nav-loop          ✓ exists, committed
  [x] nav-profile       ✓ exists, committed
  [x] nav-diagnose      ✓ exists, committed
  ...

Version Check:
  plugin.json:      5.1.0 ✓
  marketplace.json: 5.1.0 ✓
  CLAUDE.md:        5.1.0 ✓
  README.md:        5.1.0 ✓

Git Status:
  Uncommitted skills: 0 ✓
  Untracked skills:   0 ✓

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
VALIDATION: PASSED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Step 3: Confirm Version

步骤3:确认版本

Ask user to confirm version:
Ready to release Navigator vX.Y.Z

This will:
1. Commit any pending changes
2. Push to origin/main
3. Create git tag vX.Y.Z
4. Create GitHub release

Proceed? [Y/n]
请求用户确认版本
Ready to release Navigator vX.Y.Z

This will:
1. Commit any pending changes
2. Push to origin/main
3. Create git tag vX.Y.Z
4. Create GitHub release

Proceed? [Y/n]

Step 4: Execute Release

步骤4:执行发布

If confirmed, run release sequence:
bash
undefined
若用户确认,运行发布序列:
bash
undefined

1. Commit if needed

1. Commit if needed

git add . git commit -m "chore(release): prepare vX.Y.Z" || true
git add . git commit -m "chore(release): prepare vX.Y.Z" || true

2. Push to origin

2. Push to origin

git push origin main
git push origin main

3. Create tag (AFTER push)

3. Create tag (AFTER push)

git tag -a vX.Y.Z -m "Navigator vX.Y.Z: [description]" git push origin vX.Y.Z
git tag -a vX.Y.Z -m "Navigator vX.Y.Z: [description]" git push origin vX.Y.Z

4. Create GitHub release

4. Create GitHub release

gh release create vX.Y.Z --title "Navigator vX.Y.Z" --notes-file RELEASE-NOTES-vX.Y.Z.md
undefined
gh release create vX.Y.Z --title "Navigator vX.Y.Z" --notes-file RELEASE-NOTES-vX.Y.Z.md
undefined

Step 5: Post-Release Verification

步骤5:发布后验证

Verify tag contains all skills:
bash
python3 functions/release_validator.py --verify-tag vX.Y.Z
Clear local cache (for testing):
bash
rm -rf ~/.claude/plugins/cache/navigator-marketplace/
Instruct user to test:
Release complete! To verify:

1. Run: /plugin install navigator
2. Check plugin list shows vX.Y.Z
3. Verify no errors in plugin details

If errors occur, see: .agent/sops/deployment/plugin-release.md

验证标签包含所有Skill
bash
python3 functions/release_validator.py --verify-tag vX.Y.Z
清理本地缓存(用于测试):
bash
rm -rf ~/.claude/plugins/cache/navigator-marketplace/
指导用户进行测试
Release complete! To verify:

1. Run: /plugin install navigator
2. Check plugin list shows vX.Y.Z
3. Verify no errors in plugin details

If errors occur, see: .agent/sops/deployment/plugin-release.md

Predefined Functions

预定义函数

functions/release_validator.py

functions/release_validator.py

Validates plugin integrity before release:
bash
undefined
在发布前验证插件完整性:
bash
undefined

Check all skills exist and are committed

Check all skills exist and are committed

python3 functions/release_validator.py --check-all
python3 functions/release_validator.py --check-all

Verify specific version

Verify specific version

python3 functions/release_validator.py --check-version 5.1.0
python3 functions/release_validator.py --check-version 5.1.0

Verify tag contents

Verify tag contents

python3 functions/release_validator.py --verify-tag v5.1.0

---
python3 functions/release_validator.py --verify-tag v5.1.0

---

Error Handling

错误处理

Missing skill detected:
❌ VALIDATION FAILED

Missing skills:
  - skills/nav-profile/ (referenced in plugin.json but not found)

Fix: Create the skill or remove from plugin.json
Uncommitted skills detected:
❌ VALIDATION FAILED

Uncommitted skills:
  - skills/nav-loop/ (modified)
  - skills/nav-profile/ (untracked)

Fix: git add skills/ && git commit -m "Add missing skills"
Version mismatch detected:
❌ VALIDATION FAILED

Version mismatch:
  plugin.json:      5.1.0
  marketplace.json: 5.0.0  ← MISMATCH
  CLAUDE.md:        5.1.0

Fix: Update marketplace.json to 5.1.0

检测到缺失Skill
❌ VALIDATION FAILED

Missing skills:
  - skills/nav-profile/ (referenced in plugin.json but not found)

Fix: Create the skill or remove from plugin.json
检测到未提交的Skill
❌ VALIDATION FAILED

Uncommitted skills:
  - skills/nav-loop/ (modified)
  - skills/nav-profile/ (untracked)

Fix: git add skills/ && git commit -m "Add missing skills"
检测到版本不匹配
❌ VALIDATION FAILED

Version mismatch:
  plugin.json:      5.1.0
  marketplace.json: 5.0.0  ← MISMATCH
  CLAUDE.md:        5.1.0

Fix: Update marketplace.json to 5.1.0

Success Criteria

成功标准

Release is successful when:
  • All skills validated (exist + committed)
  • Version consistent across all files
  • Git tag created after all commits
  • GitHub release published
  • Test installation succeeds (no errors)

发布成功的条件:
  • 所有Skill均通过验证(已存在且已提交)
  • 所有文件中的版本保持一致
  • 在所有提交完成后创建Git标签
  • GitHub发布已创建
  • 测试安装成功(无错误)

Quick Reference

快速参考

bash
undefined
bash
undefined

Full release with validation

Full release with validation

"Release Navigator v5.2.0"
"Release Navigator v5.2.0"

Just validate (no release)

Just validate (no release)

"Validate plugin for release"
"Validate plugin for release"

Fix after failed release

Fix after failed release

"Fix release tag v5.1.0"

---
"Fix release tag v5.1.0"

---

Related

相关链接

  • SOP:
    .agent/sops/deployment/plugin-release.md
  • Config:
    .claude-plugin/plugin.json
  • Marketplace:
    .claude-plugin/marketplace.json
  • SOP文档
    .agent/sops/deployment/plugin-release.md
  • 配置文件
    .claude-plugin/plugin.json
  • 市场配置
    .claude-plugin/marketplace.json