什麼:新增 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 五支技能共用的機械流程去重。
28 lines
2.6 KiB
Markdown
28 lines
2.6 KiB
Markdown
---
|
|
name: skill-new
|
|
description: Create a new skill in the jsc skill set. Ask skill details via decision tree, generate the skill under the right jsc-{domain} per guidelines.md (create the domain from the template repo if missing), then open a PR via jsc-git pr. Use when the user wants to add a skill; not for editing an existing one (use skill-update).
|
|
---
|
|
|
|
# skill-new — create a skill
|
|
|
|
Single source of guidelines: [`../../references/guidelines.md`](../../references/guidelines.md).
|
|
|
|
## Flow
|
|
|
|
1. Ask for skill details via the `jsc-ask:ask` decision tree until no doubt remains:
|
|
- Goal (single and not duplicating an existing skill; first scan `jsc-*/skills/*/SKILL.md` and list similar skills for comparison — options must state the impact scope of "reuse existing" versus "create new")
|
|
- 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 (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.
|
|
3. Generate the skill per guidelines.md — this step MUST run as a sub agent:
|
|
- `skills/{name}/SKILL.md`: entirely in English (description ≤ 5 sentences with trigger conditions; body in STE100-style English)
|
|
- Rules enforceable by hooks go to `jsc-hooks` (never scattered in this domain); standard input/output flows go to `tools/`
|
|
|
|
Then run `tools/sync-skill-manifest.sh {domain-path}` directly (no sub agent needed) to sync the domain README's 「Skills 目錄」 section and bump the version in all three manifests.
|
|
4. Self-check every item of the guidelines.md audit checklist; fix anything that fails.
|
|
5. Call `jsc-git:pr` to open a Push Request.
|