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
+10 -8
View File
@@ -1,6 +1,6 @@
---
name: skill-delete
description: Remove a skill from the jsc skill set safely. List skills, let the user pick, inventory every file referencing the skill via a sub agent, fix each affected file through decision-tree questions until guideline checks pass, then delete the skill and open a PR via jsc-git pr. Use only for removal; not for renaming (use skill-update).
description: Remove a skill from the jsc skill set safely. List skills starting from the Gitea canonical marketplace (cloning any missing domain repo), let the user pick, inventory every file referencing the skill via a sub agent, fix each affected file through decision-tree questions until guideline checks pass, then delete the skill, deep-verify each installed CLI's on-disk skill and hook storage is clean, and open a PR via jsc-git pr. Use only for removal; not for renaming (use skill-update).
---
# skill-delete — delete a skill
@@ -9,14 +9,16 @@ Single source of guidelines: [`../../references/guidelines.md`](../../references
## Flow
1. List every skill in the skill set: scan `jsc-*/skills/*/SKILL.md`.
2. Let the user pick the skill to delete. Options state the impact scope: which skills reference it, and that its command stops working after deletion.
3. Inventory every file related to the skill — this step MUST run as a sub agent:
1. Query Gitea for the canonical skill set first: run `jsc-gitea/tools/gitea.sh api GET /repos/plugins/jsc/raw/.claude-plugin/marketplace.json` to get the authoritative domain list, then scan local `jsc-*/skills/*/SKILL.md` and present a "domain / name / description" list covering every domain in the marketplace. Completion condition: the list covers all marketplace domains.
2. For any marketplace domain whose repo is missing from the working directory, clone it first (`gitea.sh clone-url plugins/{domain}`), then rescan. Completion condition: every domain repo exists locally.
3. Let the user pick the skill to delete. Options state the impact scope: which skills reference it, and that its command stops working after deletion.
4. Inventory every file related to the skill — this step MUST run as a sub agent:
- `grep -r` for the skill name and `/jsc-{domain}:{name}` across all jsc-* repositories
- References in other SKILL.md files, the domain README's 「Skills 目錄」 section, the two marketplace.json files in `plugins/jsc` plus their synced copies in every domain repo, `tools/`, and the `jsc-hooks` wiring
4. For each affected file:
5. For each affected file:
1. Decide whether the file needs a fix to keep its current behavior after the deletion. If no fix is needed, **skip the rest of this loop**.
2. Ask for fix details via the `jsc-ask:ask` decision tree (call a replacement skill? inline the flow? drop the feature too?). Every option states its impact scope.
3. After fixing, check the guidelines.md audit checklist. On failure, return to step 4.2.
5. Delete the skill directory `skills/{name}/`, then sync the domain README and bump the version in all three manifests.
6. Call `jsc-git:pr` to open a Push Request.
3. After fixing, check the guidelines.md audit checklist. On failure, return to step 5.2.
6. Delete the skill directory `skills/{name}/`, then sync the domain README and bump the version in all three manifests.
7. Deep-delete verification — this step MUST run as a sub agent: after deleting via each CLI's native plugin commands, physically inspect every installed CLI's on-disk skill and hook storage. Detect CLIs via `jsc-cli/tools/detect-clis.sh`; check Claude's `~/.claude/plugins/cache/` and hook entries in settings, plus the equivalent locations for codex / copilot / antigravity / kiro. Confirm no file or hook wiring for the deleted skill remains. Completion condition: every location checked and clean; remove any leftover by hand and recheck.
8. Call `jsc-git:pr` to open a Push Request.