feat(meta): 抽出技能目錄同步與引用查找為共用工具

什麼:新增 tools/sync-skill-manifest.sh(重建 domain README 的「Skills 目錄」區塊並將三份 plugin manifest 的版本一併 bump)與 tools/find-skill-refs.sh(掃描所有 jsc domain 存取庫,列出技能名稱或 /jsc-{domain}:{name} 指令形式的引用檔案),並更新 skill-check、skill-delete、skill-new、skill-update、skillset-update 五支 SKILL.md 改為呼叫這兩支工具。skill-delete 與 skill-update 的 frontmatter description 也一併收斂在此次改動內,配合本次流程調整精簡文字。
為何:五支技能先前各自以近乎相同的內嵌文字描述「同步 README、bump 版本」的機械流程,重複維護成本高且容易漂移;skill-delete 的引用盤點步驟先前只是一段沒有工具、也沒有標明子代理人的裸 grep 指示,稽核時難以驗證涵蓋範圍。
如何:把兩段機械流程各自抽成一支冪等 shell 工具,五支技能的對應步驟改為「子代理人只做內容判斷與修改,機械式同步與版本 bump 一律呼叫工具」;skill-delete 步驟 4 改呼叫 find-skill-refs.sh 取代裸 grep 說明。
負責範圍:jsc-meta 技能組自我管理,skill-check、skill-delete、skill-new、skill-update、skillset-update 五支技能共用的機械流程去重。
This commit is contained in:
2026-08-24 14:49:23 +08:00
parent 720ec6194e
commit 4454d62e82
7 changed files with 217 additions and 10 deletions
+1 -1
View File
@@ -11,6 +11,6 @@ Single source of guidelines: [`../../references/guidelines.md`](../../references
1. Ask for the change details via the `jsc-ask:ask` decision tree: what rule or behavior changes, which skills and which domains are affected. Include three required checks before the affected-skill list is final: whether any deterministic input/output flow must move to `tools/`, whether any detailed flow must run as a sub agent, and whether any wiki or Gitea flow must read inherited environment variables before asking the user. Every option states its impact scope (example: changing a shared flow step touches every skill that calls it). Completion condition: the affected-skill list and the three checks are agreed with the user.
2. Query the Gitea canonical marketplace for the authoritative domain list: run `jsc-gitea/tools/gitea.sh api GET /repos/plugins/jsc/raw/.claude-plugin/marketplace.json`. Clone any domain repo missing from the working directory (`gitea.sh clone-url plugins/{domain}`) and pull the rest. Completion condition: every domain repo exists locally and is current.
3. Apply the change to every affected skill — this step MUST run as a sub agent, one sub agent per affected domain repo: modify SKILL.md and related files and tools, sync that domain README's 「Skills 目錄」 section, and bump the version in all three manifests. Completion condition: every affected domain repo carries the change, the README sync, and the manifest bump.
3. Apply the change to every affected skill — the modification part MUST run as a sub agent, one sub agent per affected domain repo: modify SKILL.md and related files and tools. Then run `tools/sync-skill-manifest.sh {domain-path}` directly (no sub agent needed) for each affected domain repo to sync that domain README's 「Skills 目錄」 section and bump the version in all three manifests. Completion condition: every affected domain repo carries the change, the README sync, and the manifest bump.
4. Check every item of the guidelines.md audit checklist for each touched skill. On any failure, **return to step 1**: ask again and fix, until all items pass.
5. Call `jsc-git:pr` once per affected domain repo to open a Push Request. Completion condition: every affected repo has a PR URL.