From b7287239cc47e2a94135ed5412ad270a75d42506 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 08:23:53 +0000 Subject: [PATCH 1/4] =?UTF-8?q?feat(skill-ops):=20=E6=8A=80=E8=83=BD?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=B5=81=E7=A8=8B=E6=94=B9=E4=BB=A5=20Gitea?= =?UTF-8?q?=20=E6=AD=A3=E6=9C=AC=20marketplace=20=E7=82=BA=E6=BA=96?= =?UTF-8?q?=E4=B8=A6=E6=96=B0=E5=A2=9E=E6=B7=B1=E5=BA=A6=E5=88=AA=E9=99=A4?= =?UTF-8?q?=E9=A9=97=E8=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- skills/skill-delete/SKILL.md | 18 ++++++++++-------- skills/skill-new/SKILL.md | 2 +- skills/skill-update/SKILL.md | 15 ++++++++------- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/skills/skill-delete/SKILL.md b/skills/skill-delete/SKILL.md index 1a360c7..bdd9b09 100644 --- a/skills/skill-delete/SKILL.md +++ b/skills/skill-delete/SKILL.md @@ -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. diff --git a/skills/skill-new/SKILL.md b/skills/skill-new/SKILL.md index d038bb1..257acd8 100644 --- a/skills/skill-new/SKILL.md +++ b/skills/skill-new/SKILL.md @@ -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. diff --git a/skills/skill-update/SKILL.md b/skills/skill-update/SKILL.md index 1239c3e..aa55de1 100644 --- a/skills/skill-update/SKILL.md +++ b/skills/skill-update/SKILL.md @@ -1,6 +1,6 @@ --- name: skill-update -description: Update an existing skill in the jsc skill set. List all skills, let the user pick one, ask update details via decision tree, apply the change, re-check against the guidelines checklist until it passes, then open a PR via jsc-git pr. Use for modifying a skill; not for creating (skill-new) or removing (skill-delete). +description: Update an existing skill in the jsc skill set. List all skills starting from the Gitea canonical marketplace (plugins/jsc marketplace.json), cloning any missing domain repo, then let the user pick one, ask update details via decision tree, apply the change, re-check against the guidelines checklist until it passes, then open a PR via jsc-git pr. Use for modifying a skill; not for creating (skill-new) or removing (skill-delete). --- # skill-update — update a skill @@ -9,9 +9,10 @@ Single source of guidelines: [`../../references/guidelines.md`](../../references ## Flow -1. List every skill in the skill set: scan `jsc-*/skills/*/SKILL.md` and present a "domain / name / description" list. -2. Let the user pick the skill to update. -3. Ask for update details via the `jsc-ask:ask` decision tree (change the goal? the trigger? the flow? move rules down to a hook or a tool?). Every option states its impact scope (example: renaming breaks the existing invocation command). -4. Update the skill — this step MUST run as a sub agent: modify SKILL.md and related files, sync the domain README's 「Skills 目錄」 section, and bump the version in all three manifests. -5. Check every item of the guidelines.md audit checklist. On any failure, **return to step 3**: ask again and fix, until all items pass. -6. Call `jsc-git:pr` to open a Push Request. +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 update. +4. Ask for update details via the `jsc-ask:ask` decision tree (change the goal? the trigger? the flow? move rules down to a hook or a tool?). Every option states its impact scope (example: renaming breaks the existing invocation command). +5. Update the skill — this step MUST run as a sub agent: modify SKILL.md and related files, sync the domain README's 「Skills 目錄」 section, and bump the version in all three manifests. +6. Check every item of the guidelines.md audit checklist. On any failure, **return to step 4**: ask again and fix, until all items pass. +7. Call `jsc-git:pr` to open a Push Request. From 30687d5eeaa939bda5e9a3078acb9e922ae9cf70 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 08:23:53 +0000 Subject: [PATCH 2/4] =?UTF-8?q?feat(skillset-update):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20skillset-update=20=E6=8A=80=E8=83=BD=E2=80=94=E2=80=94?= =?UTF-8?q?=E4=B8=80=E4=BB=BD=E8=AE=8A=E6=9B=B4=E9=9C=80=E6=B1=82=E6=89=B9?= =?UTF-8?q?=E6=AC=A1=E5=A5=97=E7=94=A8=E5=88=B0=E6=95=B4=E5=80=8B=E6=8A=80?= =?UTF-8?q?=E8=83=BD=E7=B5=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What(改了什麼): - 新增 skills/skillset-update/SKILL.md:五步流程——決策樹確認變更範圍 → 依 Gitea 正本 marketplace 同步全部 domain repo → 每個受影響 domain 各派一個 sub agent 套用變更(含 README「Skills 目錄」同步與三份 manifest 版本遞增)→ 逐技能過 guidelines 審核檢查清單 → 每個受影響 repo 各開一個 PR。 - README.md「Skills 目錄」新增 skillset-update 條目,並同步更新 skill-update 與 skill-delete 的流程描述(marketplace 先行、補 clone、深度刪除驗證)。 Why(為什麼改): - 既有 skill-update 一次只能改一個技能;跨多技能、多 domain 的規則變更(如共用流程步驟調整)需要逐 repo 重複操作,容易漏改。 - README 需與技能實際流程保持同步,此為 guidelines 審核檢查清單的必要項目。 How(怎麼改): - 依 guidelines.md 準則撰寫:英文 description 含觸發與不觸發時機(單一技能改用 skill-update)、Gitea 操作一律走 jsc-gitea/tools/gitea.sh、提問一律走 jsc-ask:ask、需隔離的步驟標明 MUST run as a sub agent、每步標明完成條件。 - README 條目與各技能一節的敘述對齊 SKILL.md 的實際流程。 - 註:README.md 的三處變更位於同一個 diff hunk、無法乾淨拆分,故整檔併入本群組(本群組為最後一個觸及 README 的 feature 群組)。 Who(影響哪個功能/使用者): - 需要對整個 jsc 技能組做橫向規則變更的維護者;單一技能更新的使用者不受影響(仍走 skill-update)。 Co-Authored-By: Claude Fable 5 --- README.md | 8 ++++++-- skills/skillset-update/SKILL.md | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 skills/skillset-update/SKILL.md diff --git a/README.md b/README.md index 7685f15..8fa49ad 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,15 @@ Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/jsc.git),安 ### `skill-update` -更新技能:列出全部技能 → 使用者選擇 → 決策樹問更新細節 → 更新後依審核檢查清單逐項檢查,不符就回到詢問 → PR。 +更新技能:先查 Gitea 正本 marketplace 取得 domain 清單並補 clone 缺少的存取庫,列出全部技能 → 使用者選擇 → 決策樹問更新細節 → 更新後依審核檢查清單逐項檢查,不符就回到詢問 → PR。 ### `skill-delete` -刪除技能:列出全部技能 → 使用者選擇 → sub agent 盤點關聯檔案 → 逐檔判斷是否需修正以維持功能(需要就決策樹問修正細節並依準則檢查)→ 刪除 → PR。 +刪除技能:先查 Gitea 正本 marketplace 取得 domain 清單並補 clone 缺少的存取庫,列出全部技能 → 使用者選擇 → sub agent 盤點關聯檔案 → 逐檔判斷是否需修正以維持功能(需要就決策樹問修正細節並依準則檢查)→ 刪除 → sub agent 實地檢查各 CLI 的技能與 hook 保存位置,確認沒有殘留 → PR。 + +### `skillset-update` + +批次更新——把一份變更需求套用到整個技能組的多個技能/domain,逐 repo 開 PR;單一技能改用 skill-update。 ### `ste100-sync` diff --git a/skills/skillset-update/SKILL.md b/skills/skillset-update/SKILL.md new file mode 100644 index 0000000..d29999c --- /dev/null +++ b/skills/skillset-update/SKILL.md @@ -0,0 +1,16 @@ +--- +name: skillset-update +description: Apply one change request across the whole jsc skill set — multiple skills in multiple domains in one pass. Ask the change details via decision tree, sync every domain repo from the Gitea canonical marketplace, apply the change per affected domain via sub agents, re-check against the guidelines checklist until it passes, then open a PR per affected repo via jsc-git pr. Use when a change spans multiple skills or domains; not for a single skill (use skill-update). +--- + +# skillset-update — apply one change across the skill set + +Single source of guidelines: [`../../references/guidelines.md`](../../references/guidelines.md). + +## Flow + +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. Every option states its impact scope (example: changing a shared flow step touches every skill that calls it). Completion condition: the affected-skill list is 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. +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. From dd047810588f4c188aed7b87a0f1445f99d7c573 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 08:23:53 +0000 Subject: [PATCH 3/4] =?UTF-8?q?docs(guidelines):=20=E8=A3=9C=E8=A8=98=20gi?= =?UTF-8?q?tea.sh=20=E7=9A=84=20tea=20=E7=99=BB=E5=85=A5=E9=87=91=E9=91=B0?= =?UTF-8?q?=E5=82=99=E6=8F=B4=E6=A9=9F=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What(改了什麼): - 「技能設計」第 2 條補充:gitea.sh 在 token 未設定或收到 401/403 時,會自動改用 tea 的登入金鑰重試一次。 - 環境變數表 GITEA_TOKEN 的「未設定時」欄位由「詢問使用者」改為「改用 tea 登入金鑰(tea login list);tea 也沒有才詢問使用者」。 Why(為什麼改): - gitea.sh 已實作 tea token 備援,但準則文件未記載;技能作者與審核者依文件行事,文件落後會導致誤判認證失敗的處理方式。 How(怎麼改): - 僅更新 references/guidelines.md 兩處文字,與 jsc-gitea/tools/gitea.sh 的實際行為對齊,不動任何流程或工具。 Who(影響哪個功能/使用者): - 所有依 guidelines.md 撰寫或審核 jsc 技能的維護者;使用 gitea.sh 的技能在 token 失效時的預期行為自此有文件依據。 Co-Authored-By: Claude Fable 5 --- references/guidelines.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/references/guidelines.md b/references/guidelines.md index 5ba59f0..9b9b8ae 100644 --- a/references/guidelines.md +++ b/references/guidelines.md @@ -35,7 +35,7 @@ ## 技能設計 1. 每個技能必須有單一明確目標,不可與既有技能重複;能複用就複用(呼叫其他技能或工具)。 -2. 需要操作 gitea 且輸入輸出明確的技能,一律透過 `jsc-gitea/tools/gitea.sh`(curl + `GITEA_TOKEN`)或 `tea` CLI,不可自行拼 API 呼叫。 +2. 需要操作 gitea 且輸入輸出明確的技能,一律透過 `jsc-gitea/tools/gitea.sh`(curl + `GITEA_TOKEN`)或 `tea` CLI,不可自行拼 API 呼叫。gitea.sh 在 token 未設定或收到 401/403 時,會自動改用 tea 的登入金鑰重試一次。 3. 需要問使用者的技能,一律透過 `jsc-ask:ask` 的決策樹規則:選項式提問、每個選項標明影響範圍、問到沒有疑慮為止、已有紀錄的答案不再問。 ## 語言 @@ -58,7 +58,7 @@ | 變數 | 用途 | 未設定時 | | --- | --- | --- | | `GITEA_HOST` | Gitea 站台(例:`https://gitea.jsc.idv.tw`) | 詢問使用者 | -| `GITEA_TOKEN` | Gitea API token | 詢問使用者 | +| `GITEA_TOKEN` | Gitea API token | 改用 tea 登入金鑰(`tea login list`);tea 也沒有才詢問使用者 | | `JSC_WIKI_REPO_{TYPE}` | 各類型 wiki 頁所在的 `{owner}/{repo}`;TYPE = `QUESTION` / `PLAN` / `ANALYZE` / `MAINTAIN` / `REPO` / `LOG` | 退回 `JSC_WIKI_REPO` | | `JSC_WIKI_REPO` | 未逐類設定時的共用 wiki `{owner}/{repo}` | 詢問使用者 | | `JSC_HOME` | Hook 資料目錄 | 預設 `~/.jsc` | From 24b350880c55072a14900fdc3659f417f818c9fa Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 08:23:53 +0000 Subject: [PATCH 4/4] =?UTF-8?q?chore(manifest):=20jsc-meta=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC=200.0.1=20=E2=86=92=200.0.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What(改了什麼): - 三份 plugin manifest(plugin.json、.claude-plugin/plugin.json、.codex-plugin/plugin.json)的 version 由 0.0.1 遞增為 0.0.2。 Why(為什麼改): - 本次變更含技能流程更新(skill-update/skill-delete/skill-new)與新技能 skillset-update;依 guidelines 準則,技能異動必須同步遞增三份 manifest 的版本。 How(怎麼改): - 各檔僅改 version 欄位一行,其餘欄位不動,三份保持一致。 Who(影響哪個功能/使用者): - 透過 jsc marketplace 安裝或更新 jsc-meta 的所有 CLI 使用者;版本號變更讓各 CLI 能偵測到更新。 Co-Authored-By: Claude Fable 5 --- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- plugin.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 3125599..63a70bd 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-meta", - "version": "0.0.1", + "version": "0.0.2", "description": "技能組自我管理:新建/更新/刪除技能與技能準則", "skills": "./skills", "author": { diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index ed5b519..f047617 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-meta", - "version": "0.0.1", + "version": "0.0.2", "description": "技能組自我管理:新建/更新/刪除技能與技能準則", "skills": "./skills" } diff --git a/plugin.json b/plugin.json index 755a73e..dd61698 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-meta", - "version": "0.0.1", + "version": "0.0.2", "description": "技能組自我管理:新建/更新/刪除技能與技能準則", "skills": "./skills/" }