feat(skill-ops): 技能管理流程改以 Gitea 正本 marketplace 為準並新增深度刪除驗證

What(改了什麼):
- skill-update:流程改為先呼叫 gitea.sh 取得 plugins/jsc marketplace.json 的 domain 清單,缺少的 domain repo 先 clone 再列出技能;原 6 步改為 7 步,description 同步更新。
- skill-delete:同樣先查 marketplace 並補 clone 缺少的 repo;刪除後新增第 7 步「深度刪除驗證」——由 sub agent 透過 detect-clis.sh 實地檢查每個已安裝 CLI 的技能與 hook 保存位置(如 Claude 的 ~/.claude/plugins/cache/ 與 settings 內的 hook 設定),確認無殘留,有殘留就手動清除並複查。
- skill-new:domain 在 Gitea 已存在但工作目錄缺少時,改為 clone 既有 repo 後直接進入第 3 步,不再重建。

Why(為什麼改):
- 只掃本機 jsc-*/skills 會漏掉尚未 clone 的 domain,技能清單不完整;正本 marketplace 才是權威來源。
- 刪除技能後各 CLI 的快取與 hook 設定可能殘留,僅執行原生刪除指令不足以保證乾淨。
- domain repo 已存在卻重建會蓋掉既有內容。

How(怎麼改):
- 三個 SKILL.md 的 Flow 前段統一加入「gitea.sh api GET /repos/plugins/jsc/raw/.claude-plugin/marketplace.json 取得 domain 清單 → gitea.sh clone-url 補 clone → 重掃」步驟,並標明完成條件。
- skill-delete 新增 MUST run as a sub agent 的深度驗證步驟,涵蓋 claude / codex / copilot / antigravity / kiro 的對應保存位置。
- 後續步驟編號與回跳目標(如「回到步驟 5.2」)同步修正。

Who(影響哪個功能/使用者):
- 使用 jsc-meta:skill-update、skill-delete、skill-new 的所有使用者;技能清單自此涵蓋全部 marketplace domain,刪除技能後保證各 CLI 無殘留。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-21 08:23:53 +00:00
co-authored by Claude Fable 5
parent a2057ad3e4
commit b7287239cc
3 changed files with 19 additions and 16 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ Single source of guidelines: [`../../references/guidelines.md`](../../references
- Trigger (when to use, when not to, trigger keywords)
- Input and output (can a standard input/output flow move down to `tools/`; does it need Gitea operations — if so, make the skill use `jsc-gitea/tools/gitea.sh` + token)
- Owning domain (list the existing `jsc-*` domains to choose from)
2. If the domain does not exist:
2. If the domain does not exist (if the repository exists on Gitea but not in the working directory, clone it and skip to step 3):
1. Propose one short English word for the new domain (a single word preferred) and confirm it with the user.
2. Ask the user to create the repository `plugins/{domain}`. Clone it, then build the content following the structure of `https://gitea.jsc.idv.tw/plugins/template`: three plugin manifests (plugin name `jsc-{domain}`, version starting at `0.0.1`), `skills/`, README.md, AGENTS.md.
3. Add the plugin entry (URL source pointing at the new repository) to `.claude-plugin/marketplace.json` and `.agents/plugins/marketplace.json` in `plugins/jsc` (the canonical copy), then sync the two updated files to every domain repository, including the new one. Every repo carries the same marketplace files, so any repo works as the registration entry point. The sync MUST run as a sub agent.