What:依 jsc-meta:skill-check 的稽核結果修正技能與工具——補上每個步驟的可檢核完成條件、 把留在內文的標準輸入輸出流程下放 tools/、修正查表與退碼路由造成的誤判。 Why:稽核發現這些缺失會讓技能在實際執行時走錯分支或靜默通過。 完成條件缺漏是最常被違反的一項;退碼誤判與查表錯誤則會讓良性狀況被當成失敗。 How:逐項對照 references/guidelines.md 的審核檢查清單修正,新增的工具都有 documented exit codes,並以真實執行驗證每條路徑。 Who:jsc-meta:skill-check 例行稽核(2026-08-25)。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
4.5 KiB
name, description
| name | description |
|---|---|
| skill-new | 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.
Flow
-
Ask for skill details via the
jsc-ask:askdecision tree until no doubt remains:- Goal (single and not duplicating an existing skill; run
tools/list-skills.shfirst and show the 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 usejsc-gitea/tools/gitea.sh+ token) - Owning domain (run
tools/sync-domains.shand offer its domain list — the domains registered in the canonical marketplace)
Completion condition: goal, trigger, input/output and owning domain each have a recorded answer.
- Goal (single and not duplicating an existing skill; run
-
If the domain does not exist (
tools/sync-domains.shclones every domain registered in the marketplace, so a missing directory means the domain is unregistered — the repository itself may already exist on Gitea):-
Propose one short English word for the new domain (a single word preferred) and confirm it with the user. Completion condition: the user confirms the domain word.
-
Check before creating: run
jsc-gitea/tools/gitea.sh clone-url plugins/{domain}. A URL comes back when the repository already exists — clone it, skip creation, and go on to step 2.3 to fill in whatever content is missing. Only when no URL comes back create the repository through the tool, never by hand:gitea.sh api POST /orgs/plugins/reposwhenpluginsis an organization,POST /user/reposwhenpluginsis the token's own account (tea repo createdoes the same job). Only when the call is refused (403 — the token has write but not admin rights on the owner) ask the user to createplugins/{domain}by hand, then continue. Completion condition:gitea.sh clone-url plugins/{domain}prints a URL and cloning it succeeds. -
Build the content following the structure of
https://gitea.jsc.idv.tw/plugins/template: three plugin manifests (plugin namejsc-{domain}, version starting at0.0.1),skills/, README.md, AGENTS.md. Completion condition: the three manifests,skills/, README.md and AGENTS.md all exist in the new repo. -
Register the plugin: run
tools/sync-marketplace.sh {domain} {repo-url} {description}. It needspython3on PATH — it edits the marketplace JSON with the json module. It writes the entry into both canonical marketplace files inplugins/metaand copies both into every domain repo, so any repo works as the registration entry point. Route each exit code:- Exit 3 — written, but some domain repo is not present locally. Run
tools/sync-domains.sh, then rerun this step. - Exit 2 — usage error. Fix the three arguments and rerun.
- Exit 1 — missing python3, an unreadable canonical file, or a byte mismatch between copies. Read stderr, fix the named cause (install python3 for the first), then rerun.
- Exit 0 — every copy holds identical bytes; the script verifies that itself.
Completion condition: the script exits 0 and prints the touched paths.
- Exit 3 — written, but some domain repo is not present locally. Run
-
-
Generate the skill per guidelines.md — this step MUST run as a sub agent:
skills/{name}/SKILL.md: entirely in English (description within either cap — ≤ 5 sentences or ≤ 5 steps — and stating when to use and when not to; body in STE100-style English)- Rules enforceable by hooks go to
jsc-hooks(never scattered in this domain); standard input/output flows go totools/
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. Completion condition:skills/{name}/SKILL.mdexists, the README lists the skill, and all three manifests show the same new version. -
Self-check every item of the guidelines.md audit checklist; fix anything that fails. Completion condition: every checklist item passes.
-
Call
jsc-git:prto open a Push Request. Completion condition: a PR URL comes back.