How this skill is triggered — by the user, by Claude, or both
Slash command
/plugin-tools:plugin-deployThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
---
完整的 plugin 發布流程:品質檢查 → 版本號 → marketplace 同步 → commit → push → reload。
從 $ARGUMENTS 取得 plugin name,找到 plugin 目錄:
MARKETPLACE_ROOT="找到 marketplace repo 根目錄"
PLUGIN_DIR="$MARKETPLACE_ROOT/plugins/$PLUGIN_NAME"
如果找不到,問使用者。
檢查 plugin 是否準備好發布:
| 項目 | 檢查方式 | 必要? |
|---|---|---|
| plugin.json 存在 | 讀取 .claude-plugin/plugin.json | 必要 |
| name 是 kebab-case | 正則檢查 | 必要 |
| description 有填 | 長度 > 0 | 必要 |
| version 有填 | semver 格式 | 必要 |
| 至少一個 skill 或 command | 掃描 skills/ 和 commands/ | 必要 |
| 每個 SKILL.md 有 description | 讀取 frontmatter | 必要 |
| README.md 存在 | 檔案存在 | 建議 |
| CLAUDE.md 存在 | 檔案存在 | 建議 |
| 無硬編碼絕對路徑 | grep /Users/ 等 | 建議 |
| hooks 用 ${CLAUDE_PLUGIN_ROOT} | grep hooks 中的路徑 | 如有 hooks |
## Plugin Deploy Pre-flight: {plugin-name}
### 必要項目
- [x] plugin.json ✅
- [x] name: {name} ✅
- [x] description ✅
- [x] version: {version} ✅
- [x] skills: {count} 個 ✅
### 建議項目
- [x] README.md ✅
- [ ] LICENSE ❌
- [x] CLAUDE.md ✅
### 問題
{列出需要修正的項目}
要修正問題後繼續,還是直接發布?
如果有問題,幫使用者修正:
問使用者版本號要怎麼升:
目前版本:{current_version}
1. Patch({x.y.z+1})— bug fix、小修正
2. Minor({x.y+1.0})— 新功能、新 skill
3. Major({x+1.0.0})— 破壞性變更
4. 自訂版本號
更新兩個地方的版本號:
plugins/{name}/.claude-plugin/plugin.json 的 version.claude-plugin/marketplace.json 中對應 plugin 的 version確認 marketplace.json 中的 plugin entry 資訊是最新的:
cd "$MARKETPLACE_ROOT"
git add "plugins/{plugin-name}" ".claude-plugin/marketplace.json"
git commit -m "release: {plugin-name} v{new_version} — {簡述變更}"
git push origin main
# 同步 marketplace cache
claude plugin marketplace update {marketplace-name}
# 更新已安裝的 plugin
claude plugin update {plugin-name}
# 確認版本正確
claude plugin list | grep {plugin-name}
提示使用者:
{plugin-name} v{new_version} 已發布!
- marketplace.json ✅ 已更新
- git push ✅ 已推送
- plugin cache ✅ 已同步
- 安裝版本 ✅ 已更新
其他使用者可透過以下指令安裝/更新:
/plugin marketplace update {marketplace-name}
/plugin install {plugin-name}@{marketplace-name}
claude --plugin-dir 本地測試npx claudepluginhub psychquant/psychquant-claude-plugins --plugin plugin-toolsGuides creating, validating, and managing Claude Code plugin marketplaces including marketplace.json schema, plugin entries, and best practices for setup and distribution.
Validates and auto-fixes claude-code-plugin marketplace structure: JSON validity, skill dirs, frontmatter, plugin.json consistency, invalid keys, unregistered skills. Local CI equivalent.