From 03a47f2684d85f9ce831e1238fde9b1e61a681d1 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 13:08:18 +0800 Subject: [PATCH 1/6] =?UTF-8?q?chore(cli):=20=E4=BF=AE=E6=AD=A3=E7=AF=84?= =?UTF-8?q?=E6=9C=AC=20manifest=20=E8=88=87=E7=A7=BB=E9=99=A4=20hello=20?= =?UTF-8?q?=E7=AF=84=E4=BE=8B=E7=AC=A6=E5=90=88=20cli=20=E9=A0=98=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- .agents/plugins/marketplace.json | 6 ++--- .claude-plugin/marketplace.json | 8 +++---- .claude-plugin/plugin.json | 17 +++++++++----- .codex-plugin/plugin.json | 6 ++--- plugin.json | 8 +++---- skills/hello/SKILL.md | 38 -------------------------------- 6 files changed, 25 insertions(+), 58 deletions(-) delete mode 100644 skills/hello/SKILL.md diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json index 2c2dafc..b2772f9 100644 --- a/.agents/plugins/marketplace.json +++ b/.agents/plugins/marketplace.json @@ -1,11 +1,11 @@ { - "name": "template", + "name": "cli", "plugins": [ { - "name": "jsc-template", + "name": "jsc-cli", "source": { "source": "url", - "url": "https://gitea.jsc.idv.tw/plugins/template.git" + "url": "https://gitea.jsc.idv.tw/plugins/cli.git" } } ] diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index e3d2436..20d4b79 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -1,14 +1,14 @@ { - "name": "template", - "description": "JSC 跨 AI 助理共用 skills 的 Claude Code marketplace。", + "name": "cli", + "description": "jsc 技能組 cli domain 的 marketplace。", "owner": { "name": "JSC" }, "plugins": [ { - "name": "jsc-template", + "name": "jsc-cli", "source": "./", - "description": "JSC 共用 skills(跨 AI 助理)" + "description": "CLI 偵測、模型能力標籤與技能庫批次部署" } ] } diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index a5c2dd3..81aab37 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,12 +1,17 @@ { - "name": "jsc-template", - "version": "0.0.3", - "description": "JSC 跨 AI 助理共用 plugin 模板(Claude Code / Codex / Antigravity / OpenCode)。所有 skills 以 SKILL.md 為共通標準,於 Claude Code 以 /jsc-template: 前綴呼叫。", + "name": "jsc-cli", + "version": "0.2.0", + "description": "CLI 偵測、模型能力標籤與技能庫批次部署", "skills": "./skills", "author": { "name": "JSC" }, - "homepage": "https://gitea.jsc.idv.tw/plugins/template", - "repository": "https://gitea.jsc.idv.tw/plugins/template.git", - "keywords": ["template", "skills", "cross-tool", "jsc"] + "homepage": "https://gitea.jsc.idv.tw/plugins/cli", + "repository": "https://gitea.jsc.idv.tw/plugins/cli.git", + "keywords": [ + "jsc", + "cli", + "skills", + "cross-tool" + ] } diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 71a3c32..981a1df 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { - "name": "jsc-template", - "version": "0.0.3", - "description": "JSC 跨 AI 助理共用 plugin 模板。所有 skills 以 SKILL.md 為共通標準。", + "name": "jsc-cli", + "version": "0.2.0", + "description": "CLI 偵測、模型能力標籤與技能庫批次部署", "skills": "./skills" } diff --git a/plugin.json b/plugin.json index 4873395..5fb608e 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { - "name": "jsc-template", - "version": "0.0.3", - "description": "JSC 跨 AI 助理共用 plugin 模板。所有 skills 以 SKILL.md 為共通標準;於 Antigravity 以 /jsc-template: 前綴呼叫。", + "name": "jsc-cli", + "version": "0.2.0", + "description": "CLI 偵測、模型能力標籤與技能庫批次部署", "skills": "./skills/" -} \ No newline at end of file +} diff --git a/skills/hello/SKILL.md b/skills/hello/SKILL.md deleted file mode 100644 index c5be22f..0000000 --- a/skills/hello/SKILL.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: hello -description: 範例 skill,用來驗證 jsc plugin 是否安裝成功,也是新增 skill 的範本。當使用者輸入 hello、想測試 plugin、或想看 skill 模板長什麼樣子時觸發;回覆一句問候並簡述此 plugin 的用途。 ---- - -# hello(範例 skill) - -這是 `jsc-template` plugin 的範例 skill。它有兩個用途: - -1. **驗證安裝** — 跨各家 AI 助理確認 skill 已被正確載入。 -2. **作為範本** — 複製這個資料夾即可新增一個新的 skill。 - -## 呼叫方式 - -| 助理 | 呼叫方式 | -| --- | --- | -| Claude Code | `/jsc-template:hello` | -| Antigravity | `/jsc-template:hello`,或描述需求自動觸發 | -| Codex | 在提示詞輸入 `$hello`,或用 `/skills` 選單 | -| OpenCode | 直接描述需求,模型會透過 skill 工具自動呼叫 | -| GitHub Copilot CLI | 直接描述需求,Copilot 會讀取已安裝 plugin 的 skills | - -## 行為 - -當這個 skill 被觸發時: - -1. 回覆「Hello from **jsc** 👋」。 -2. 用一句話說明 `jsc-template` 是一個跨 AI 助理的共用 skill 集合。 -3. 提示使用者可以在 README 的「Skills 目錄」查看所有可用的 skills。 - -## 如何以此為範本新增 skill - -1. 複製 `skills/hello/` 為 `skills//`。 -2. 修改 `SKILL.md` 的 frontmatter: - - `name`:小寫、數字、連字號(`-`),最長 64 字元。**這個名稱會成為 Claude Code / Antigravity 的 `/jsc-template:` 指令**。 - - `description`:第三人稱,寫清楚「什麼時候該用、什麼時候不該用」與觸發關鍵字 — 各家助理靠這段文字決定是否自動載入。 -3. 在內文寫下 skill 的具體步驟。 -4. 手動把新 skill 補進 README 的「Skills 目錄」區塊。 -- 2.53.0 From 8c009348675bdc6e58d4a04bcfdb542851f0b75f Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 13:08:43 +0800 Subject: [PATCH 2/6] =?UTF-8?q?feat(cli):=20=E5=8C=AF=E5=85=A5=20jsc-cli?= =?UTF-8?q?=20=E6=8A=80=E8=83=BD=E7=B5=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- references/model-tags.md | 37 +++++++++++++++++++++++++++++++++++++ skills/deploy/SKILL.md | 24 ++++++++++++++++++++++++ skills/models/SKILL.md | 24 ++++++++++++++++++++++++ tools/detect-clis.sh | 16 ++++++++++++++++ 4 files changed, 101 insertions(+) create mode 100644 references/model-tags.md create mode 100644 skills/deploy/SKILL.md create mode 100644 skills/models/SKILL.md create mode 100755 tools/detect-clis.sh diff --git a/references/model-tags.md b/references/model-tags.md new file mode 100644 index 0000000..954280d --- /dev/null +++ b/references/model-tags.md @@ -0,0 +1,37 @@ +# 模型能力標籤對照表 + +標籤定義: + +| 標籤 | 意義 | +| --- | --- | +| reasoning-high | 高階推理,適合規劃與分析 | +| coding | 程式碼產生與修改能力佳 | +| fast | 低延遲 | +| cheap | 低成本 | +| long-context | 長上下文(≥ 200K tokens) | +| vision | 可讀取圖片 | + +## 對照表(2026-08 已知模型) + +| 模型 | 標籤 | +| --- | --- | +| claude-fable-5 | reasoning-high, coding, long-context, vision | +| claude-opus-5 | reasoning-high, coding, long-context, vision | +| claude-sonnet-5 | reasoning-high, coding, fast, long-context, vision | +| claude-haiku-4-5 | coding, fast, cheap, long-context, vision | +| gpt-5.x / o 系列(codex 預設) | reasoning-high, coding, long-context, vision | +| gpt-5.x-mini / codex-mini | coding, fast, cheap | +| gemini-3-pro | reasoning-high, coding, long-context, vision | +| gemini-3-flash | coding, fast, cheap, long-context, vision | +| copilot 內建(gpt/claude 選項) | 依所選底層模型比照上表 | + +## SDLC 階段需求 + +| 階段 | 必要標籤 | +| --- | --- | +| 規劃(plan) | reasoning-high | +| 分析(analyze) | reasoning-high | +| 實作(implement) | coding | +| 維護(maintain) | 任意 | + +表列以外的模型:依 `jsc-ask:ask` 規則詢問使用者或依供應商文件補表後再判定。 diff --git a/skills/deploy/SKILL.md b/skills/deploy/SKILL.md new file mode 100644 index 0000000..4d70b6d --- /dev/null +++ b/skills/deploy/SKILL.md @@ -0,0 +1,24 @@ +--- +name: deploy +description: Batch install, update, or uninstall the whole jsc skill set on every installed AI CLI. Detect CLIs via detect-clis.sh, ask the user for the mode via decision tree, then run each CLI's native plugin commands per domain repo. Domain list comes from the plugins org on Gitea, never hardcoded. Use for rollout or removal of the jsc plugins; not for a single skill. +--- + +# deploy — 技能庫批次安裝/更新/解除安裝 + +## 步驟 + +1. `tools/detect-clis.sh` 找出已安裝的 CLI 與執行檔路徑。 +2. 依 `jsc-ask:ask` 規則讓使用者選擇模式:`install` / `update` / `uninstall`(每個選項標明影響範圍:影響哪些 CLI、會寫入哪些設定)。 +3. 取得 domain 名單(**不可硬編碼**;技能組新增或刪除 domain 時本技能自動跟進):`jsc-gitea/tools/gitea.sh repos plugins` 列出存取庫,取「repo 根目錄的 `plugin.json` 存在且 `name` 為 `jsc-{domain}`」者。每個 domain repo 自帶 marketplace(名稱 = `{domain}`),plugin 名 = `jsc-{domain}`,安裝 token = `jsc-{domain}@{domain}`。 +4. 對每個 CLI × 每個 domain 執行對應指令(`{URL}` = `https://gitea.jsc.idv.tw/plugins/{domain}.git`),**必須以 sub agent 執行**(每個 CLI 一個 sub agent): + +| CLI | install | update | uninstall | +| --- | --- | --- | --- | +| claude | `claude plugin marketplace add {URL}` 後 `claude plugin install jsc-{domain}@{domain}` | `claude plugin marketplace update {domain}` 後 `claude plugin update jsc-{domain}@{domain}` | `claude plugin uninstall jsc-{domain}@{domain}` 後 `claude plugin marketplace remove {domain}` | +| codex | `codex plugin marketplace add {URL}` 後 `codex plugin add jsc-{domain}@{domain}` | `codex plugin marketplace upgrade {domain}` | `codex plugin remove jsc-{domain}@{domain}` 後 `codex plugin marketplace remove {domain}` | +| copilot | `copilot plugin marketplace add {URL}` 後 `copilot plugin install jsc-{domain}@{domain}` | `copilot plugin marketplace update {domain}` 後 `copilot plugin update jsc-{domain}@{domain}` | `copilot plugin uninstall jsc-{domain}@{domain}` 後 `copilot plugin marketplace remove {domain}` | +| antigravity | `git clone {URL} ~/plugins/{domain}` 後 `agy plugin install ~/plugins/{domain}`(agy 不支援 gitea URL 安裝) | `git -C ~/plugins/{domain} pull` 後先 `agy plugin uninstall jsc-{domain}` 再 install | `agy plugin uninstall jsc-{domain}` | +| kiro | 比照 copilot 的 plugin 指令(執行檔 `kiro-cli`);不支援時把 repo 的 `skills/` 複製到 kiro 的 skills 目錄 | 重新 pull 後重新複製 | 刪除對應 skills 目錄 | + +5. 安裝或更新完成後呼叫 `jsc-hooks:hooks-install` 重新接線 hooks。 +6. 回報每個 CLI × 模式的結果與失敗原因。 diff --git a/skills/models/SKILL.md b/skills/models/SKILL.md new file mode 100644 index 0000000..8149c76 --- /dev/null +++ b/skills/models/SKILL.md @@ -0,0 +1,24 @@ +--- +name: models +description: List every model usable by each installed AI CLI (claude, codex, copilot, antigravity, kiro) and attach capability tags from references/model-tags.md. Also states which tags each SDLC phase requires, so jsc-sdlc skills can gate execution. Use when checking model fitness or inventorying models; not for switching models. +--- + +# models — 列出 CLI 可用模型與能力標籤 + +## 步驟 + +1. `jsc-cli/tools/detect-clis.sh` 取得已安裝的 CLI。 +2. 對每個 CLI 讀取可用/目前模型,此步驟**必須以 sub agent 執行**: + +| CLI | 取得方式 | +| --- | --- | +| claude | `~/.claude/settings.json` 的 `model`;可用家族見 model-tags.md 的 claude 列 | +| codex | `~/.codex/config.toml` 的 `model` | +| copilot | copilot 設定檔(`~/.config/copilot/`)所列模型選項 | +| antigravity | agy 設定檔所列模型 | +| kiro | kiro 設定檔所列模型 | + + 讀不到設定就列該 CLI 的已知預設模型並標注「預設推定」。 +3. 依 `references/model-tags.md` 為每個模型加上能力標籤;表列以外的模型依該文件末段規則處理。 +4. 輸出表格:CLI / 模型 / 標籤 / 是否為目前使用中。 +5. 附上 SDLC 階段需求表(plan、analyze 需 `reasoning-high`;implement 需 `coding`;maintain 任意),供 `jsc-sdlc` 各技能做模型能力檢查。 diff --git a/tools/detect-clis.sh b/tools/detect-clis.sh new file mode 100755 index 0000000..5adc931 --- /dev/null +++ b/tools/detect-clis.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env sh +# detect-clis.sh — 找出已安裝的 AI CLI 工具與執行檔路徑。 +# 輸出(TSV): namepathversion(未安裝的不輸出) +# 支援: claude / codex / copilot / antigravity(agy) / kiro +set -u +probe() { # $1=顯示名 $2=執行檔名 $3=版本參數 + p=$(command -v "$2" 2>/dev/null) || return 0 + v=$("$p" "$3" 2>/dev/null | head -n1 | tr -d '\r') || v="" + printf '%s\t%s\t%s\n' "$1" "$p" "$v" +} +probe claude claude --version +probe codex codex --version +probe copilot copilot --version +probe antigravity agy --version +probe kiro kiro-cli --version +exit 0 -- 2.53.0 From 3f03cb14e182e2de324fcb5752096ff296a85b12 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 13:08:43 +0800 Subject: [PATCH 3/6] =?UTF-8?q?docs(cli):=20=E4=BB=A5=E7=B5=B1=E4=B8=80?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E6=94=B9=E5=AF=AB=E7=B9=81=E9=AB=94=E4=B8=AD?= =?UTF-8?q?=E6=96=87=20README=20=E8=88=87=20AGENTS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- AGENTS.md | 20 ++--- README.md | 227 +++++------------------------------------------------- 2 files changed, 29 insertions(+), 218 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index a86a1f1..757210f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,15 +1,15 @@ -# jsc-template — 共用 Skills(跨 AI 助理) +# jsc-cli — 給 AI 助理的指引 -本 repo 是一組以 **Agent Skills(`SKILL.md`)** 標準撰寫的共用 skills,可同時被 Claude Code、Codex、Antigravity、OpenCode 使用。 +本 repo 是 jsc 技能組的 `cli` domain(CLI 偵測、模型能力標籤與技能庫批次部署),可同時被 Claude Code / Codex / Copilot / Antigravity / Kiro 使用。 -## 給 AI 助理的指引 +## 規則 -- 所有可用的 skills 位於本 repo 的 `skills//SKILL.md`。 -- 在處理任務前,先比對使用者需求與各 skill `SKILL.md` frontmatter 的 `description`,若相符請載入並依其步驟執行。 -- **呼叫慣例**:在 Claude Code 與 Antigravity 中,這些 skill 以 `/jsc-template:` 呼叫;Codex 以 `$`、OpenCode 由模型依描述自動觸發 — 兩者沒有 `/jsc-template:` 前綴,不需強制加。 -- 完整清單與每個 skill 的用途,請見 `README.md` 的「Skills 目錄」。 +1. 所有交談與輸出內容基於 STE100 使用繁體中文:短句、一句一指令、主動語態、術語一致、UTF-8 無亂碼。 +2. 技能位於 `skills/{name}/SKILL.md`;處理任務前先比對需求與各技能的 `description`,相符就載入並依其步驟執行。 +3. 技能準則的唯一來源:`plugins/meta` 存取庫的 `references/guidelines.md`。 +4. 所有 hook 只放在 `jsc-hooks`;gitea 操作一律經由 `jsc-gitea` 的 `tools/gitea.sh`;問使用者一律依 `jsc-ask:ask` 的決策樹規則。 +5. 主 agent 不需要處理細節的流程,一律建立 sub agent 處理。 -## 慣例 +## 呼叫慣例 -- 新增 skill 一律放在 `skills//`,且 `` 使用小寫與連字號。 -- `description` 要寫清楚觸發條件(何時用、何時不用),這是跨助理自動載入的唯一依據。 +Claude Code / Antigravity:`/jsc-cli:{name}`;Codex:`$name`;Copilot / Kiro / OpenCode:描述需求自動觸發。 diff --git a/README.md b/README.md index 6c6669e..2be8f4b 100644 --- a/README.md +++ b/README.md @@ -1,228 +1,39 @@ -# jsc-template — 跨 AI 助理 Plugin 模板 +# jsc-cli — CLI 偵測與技能庫部署 -一個可同時被 **Claude Code、Codex、Antigravity、OpenCode、GitHub Copilot** 安裝的 plugin 模板。 -核心是以 [Agent Skills(`SKILL.md`)](https://agentskills.io) 標準撰寫的共用 skills(唯一真實來源放在 `skills/`), -搭配各助理各自的 plugin manifest,讓**同一個 repo** 可用各家**原生 plugin CLI** 安裝。 -在 Claude Code 與 Antigravity 中,skill 以 **`/jsc-template:` 前綴**呼叫(例如 `/jsc-template:hello`)。 +jsc 技能組的 CLI domain:找出已安裝的 AI CLI、列出各 CLI 可用模型並加上能力標籤,以及對每個 CLI 批次安裝、更新、解除安裝整組 jsc plugins。 ---- - -## 前綴與呼叫方式 - -| 助理 | 安裝方式 | 呼叫 | `/jsc-template:` 前綴 | -| --- | --- | --- | --- | -| Claude Code | `claude plugin`(marketplace) | `/jsc-template:` 或自動觸發 | ✅ | -| Codex | `codex plugin`(marketplace) | `$` 或 `/skills` 選單 | ❌(用 `$name`) | -| Antigravity | `agy plugin install` | `/jsc-template:` 或自動觸發 | ✅ | -| OpenCode | skills 目錄(複製/clone) | 描述需求自動觸發 | ❌(依名稱) | -| GitHub Copilot CLI | `copilot plugin`(marketplace) | 自然語言或 plugin skills | ❌(無 `/jsc-template:` 前綴) | - -> Codex 不支援自訂前綴(skill 以 `$name` 呼叫);OpenCode 由模型依描述自動呼叫;Copilot CLI 透過原生 plugin 安裝後以自然語言或 plugin skills 使用。三者皆**不強制**前綴。 - ---- - -## 目錄結構 - -同一個 repo 同時帶四種 manifest,彼此以路徑隔離、互不干擾;各助理都讀同一份 `skills/`。 - -``` -template/ -├── .claude-plugin/ -│ ├── plugin.json # Claude 外掛定義(name: "jsc-template") -│ └── marketplace.json # Claude marketplace(name: "template",source 指向本 repo) -├── .codex-plugin/ -│ └── plugin.json # Codex 外掛定義(name: "jsc-template",skills: "./skills") -├── .agents/plugins/ -│ └── marketplace.json # Codex marketplace(name: "template",url source 指向本 repo) -├── plugin.json # Antigravity 外掛定義(name: "jsc-template",skills: "./skills/") -├── skills/ # ★ 唯一真實來源:所有 skills -│ └── hello/SKILL.md -├── AGENTS.md # 跨助理共用指引 -└── README.md -``` - ---- - -## 安裝 / 更新 / 移除(各助理) - -> 指令中的 repo 網址換成你的:`https://gitea.jsc.idv.tw/plugins/template.git` -> -> **Claude / Codex 從 git URL 安裝(會 clone 遠端),請先把本 repo `push` 到 gitea。** -> **Antigravity 的 `agy plugin install ` 目前只支援 github.com**;gitea 請改用「clone + 本地路徑」(見 Antigravity 節)。 -> 本機/離線:Claude 可用本地路徑加 marketplace;Antigravity 用本地路徑安裝。 - -> **⚠ 從 0.0.1 升上來的人請先移除再安裝。** 0.0.2 起 marketplace 名由 `jsc-plugins` 改為 `template` -> (舊名與 `jsc-persona` 的 marketplace 撞名)。各助理以 `@` 當安裝識別鍵, -> 改名後是兩筆獨立條目,**不能用 update 遷移**: -> -> ```bash -> claude plugin uninstall jsc-template@jsc-plugins -> claude plugin marketplace remove jsc-plugins # 若你沒有裝 jsc-persona 才移除,它也用這個名字 -> claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/template.git -> claude plugin install jsc-template@template -> ``` -> -> 移除後記得清掉 `~/.claude/settings.json` 裡 `enabledPlugins` 的舊鍵 `jsc-template@jsc-plugins`, -> 並重開工作階段。Codex/Copilot 同理(`remove`/`uninstall` 後重新 `add`+`install`)。 - -### Claude Code +## 安裝 ```bash -# 安裝 -claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/template.git -claude plugin install jsc-template@template - -# 更新 -claude plugin marketplace update template -claude plugin update jsc-template@template - -# 移除 -claude plugin uninstall jsc-template@template -claude plugin marketplace remove template +claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/cli.git +claude plugin install jsc-cli@cli ``` -- 工作階段內 slash 版(等價):把 `claude plugin` 換成 `/plugin`。 -- 本機開發(免 push):`claude plugin marketplace add C:\Users\h3285\source\repos.plugins\template`(本地路徑)後再 install。 -- **呼叫**:`/jsc-template:`(例 `/jsc-template:hello`)。 +其他 CLI(codex / copilot / antigravity / kiro)與批次安裝、更新、解除安裝:使用 `/jsc-cli:deploy`。 -### Codex +## 工具 -```bash -# 安裝 -codex plugin marketplace add https://gitea.jsc.idv.tw/plugins/template.git -codex plugin add jsc-template@template - -# 更新(重新抓取 marketplace 的 git 快照) -codex plugin marketplace upgrade template - -# 移除 -codex plugin remove jsc-template@template -codex plugin marketplace remove template -``` - -- 安裝 token `jsc-template@template` = plugin 名(`.codex-plugin/plugin.json` 的 `name`)@ marketplace 名(`.agents/plugins/marketplace.json` 的 `name`)。 -- 本 repo 的 Codex marketplace 以 `url` 來源指向自己,故 Codex **一律從 gitea 安裝**(需先 push);安裝後重啟 Codex。 -- **呼叫**:`$`(例 `$hello`),或用 `/skills` 選單。 - -### Antigravity(`agy`) - -> `agy plugin install ` 目前**只支援 github.com**;gitea 等自架 git 不支援 URL 安裝,請先 `git clone` 再用**本地路徑**安裝。 - -```bash -# 安裝:clone 後用本地路徑 -git clone https://gitea.jsc.idv.tw/plugins/template.git ~/plugins/template -agy plugin install ~/plugins/template - -# 更新(agy 無 update 子指令 → git pull 後重裝) -git -C ~/plugins/template pull -agy plugin uninstall jsc-template -agy plugin install ~/plugins/template - -# 移除 -agy plugin uninstall jsc-template -``` - -- 若把 skills 放到 GitHub,則可直接 `agy plugin install https://github.com//`。 -- 其他:`agy plugin list`、`agy plugin enable jsc-template` / `disable jsc-template`、`agy plugin validate `。安裝後重啟工作階段。 -- **呼叫**:`/jsc-template:`(例 `/jsc-template:hello`)或依描述自動觸發。 - -### OpenCode - -OpenCode 的「plugin」是 TypeScript/npm 套件,不適用於 skill 包;skills 改用**目錄安裝**。 -OpenCode 會讀 `~/.config/opencode/skills/`(也會讀 `~/.claude/skills/`、`~/.agents/skills/`)。 - -```bash -# 安裝 -git clone https://gitea.jsc.idv.tw/plugins/template.git ~/plugins/template -mkdir -p ~/.config/opencode/skills -cp -r ~/plugins/template/skills/* ~/.config/opencode/skills/ - -# 更新 -git -C ~/plugins/template pull -cp -r ~/plugins/template/skills/* ~/.config/opencode/skills/ - -# 移除 -rm -rf ~/.config/opencode/skills/hello -``` - -> **Windows PowerShell**:`cp -r A B` → `Copy-Item A B -Recurse -Force`、`rm -rf X` → `Remove-Item X -Recurse -Force`、`~` → `$HOME`。 - -- **呼叫**:直接描述需求,模型會依 skill 描述自動透過 skill 工具呼叫。 - -### GitHub Copilot CLI - -Copilot CLI 支援與 Claude Code 類似的原生 plugin / marketplace 指令,可直接從 marketplace 安裝、更新與移除本 plugin。 - -```bash -# 安裝 -copilot plugin marketplace add https://gitea.jsc.idv.tw/plugins/template.git -copilot plugin install jsc-template@template - -# 更新 -copilot plugin marketplace update template -copilot plugin update jsc-template@template - -# 移除 -copilot plugin uninstall jsc-template@template -copilot plugin marketplace remove template -``` - -- 安裝 token `jsc-template@template` = plugin 名(plugin manifest 的 `name`)@ marketplace 名。 -- `copilot plugin marketplace add` 支援 GitHub `owner/repo`、git URL 與本地路徑;Gitea repo 可用上方 HTTPS URL。 -- **呼叫**:在 Copilot CLI 中用自然語言描述需求,例如 `copilot -i "跑 hello 確認 plugin 裝好了"`。 - ---- - -## 用 CLI 直接執行 skill(headless / 一次性) - -安裝好之後,不必進互動介面,一行指令就能叫某個 skill 跑完並印出結果: - -| 助理 | headless 指令 | 執行 `hello` skill | -| --- | --- | --- | -| Claude Code | `claude -p ""` | `claude -p "/jsc-template:hello"` | -| Codex | `codex exec ""` | `codex exec '$hello'` | -| Antigravity | `agy -p ""` | `agy -p "/jsc-template:hello"` | -| OpenCode | `opencode run ""` | `opencode run "用 hello skill 打個招呼"` | -| GitHub Copilot CLI | `copilot -p ""` | `copilot -p "用 hello skill 打個招呼"` | - -- Claude / Antigravity 支援 `/jsc-template:` 前綴,直接 `-p "/jsc-template:"` 即可。 -- Codex 以 `$` 觸發;在 shell 請用**單引號**避免 `$` 被展開:`codex exec '$hello'`。 -- OpenCode 與 Copilot 沒有前綴,用自然語言描述需求;Copilot CLI 會讀取已安裝 plugin 提供的 skills。 -- 帶引數就接在後面,例如 `claude -p "/jsc-template:hello 參數"`、`codex exec '$hello 參數'`。 - ---- +| 工具 | 用途 | +| --- | --- | +| `tools/detect-clis.sh` | 列出已安裝的 AI CLI 與執行檔路徑(TSV:name / path / version;kiro 的執行檔為 `kiro-cli`) | ## Skills 目錄 -> 此區塊列出本 plugin 內含的所有 skills(名稱/描述/使用方法)。 -> 新增或修改 skill 後,請同步手動更新標記之間的內容。 +呼叫方式:Claude / Antigravity `/jsc-cli:{name}`;Codex `${name}`;Copilot / Kiro 描述需求自動觸發。 -### `hello` +### `models` -範例 skill,用來驗證 jsc plugin 是否安裝成功,也是新增 skill 的範本。當使用者輸入 hello、想測試 plugin、或想看 skill 模板長什麼樣子時觸發;回覆一句問候並簡述此 plugin 的用途。 +讀取各已安裝 CLI 可使用的模型並加上能力標籤(`references/model-tags.md`),並列出 SDLC 各階段的必要標籤,供 `jsc-sdlc` 的模型能力閘門使用。 -- **Claude Code / Antigravity**:`/jsc-template:hello` -- **Codex**:`$hello`,或用 `/skills` 選單 -- **OpenCode / GitHub Copilot CLI**:描述需求自動觸發 +### `deploy` + +技能庫批次安裝 / 更新 / 解除安裝:偵測 CLI → 決策樹選模式 → 每個 CLI 一個 sub agent 執行原生 plugin 指令。domain 名單動態取自 gitea 的 plugins org,不硬編碼。 ---- +## 相關 domain -## 新增一個 skill - -1. 複製範本:`cp -r skills/hello skills/` -2. 編輯 `skills//SKILL.md` 的 frontmatter: - - `name`:小寫、數字、連字號(`-`),最長 64 字元。**這就是 Claude Code / Antigravity 的 `/jsc-template:`**。 - - `description`:第三人稱,寫清楚「何時用、何時不用」與觸發關鍵字 — 這是各助理自動載入的唯一依據。 -3. 在內文寫下 skill 的具體步驟。 -4. 手動把這個 skill 補進上方「Skills 目錄」區塊。 -5. **bump 版本並 push**:各助理都以 git 內容/版本判斷更新,請把 `.claude-plugin/plugin.json`、`.codex-plugin/plugin.json`、`plugin.json` 三個 manifest 的 `version` 一起 bump,commit 後 push 到 gitea。 -6. 讓各助理更新: - - Claude:`claude plugin update jsc-template@template` - - Codex:`codex plugin marketplace upgrade template` - - Antigravity:`git -C ~/jsc-plugin pull && agy plugin uninstall jsc-template && agy plugin install ~/jsc-plugin` - - OpenCode:`git pull` 後重新複製 `skills/` - - Copilot:`copilot plugin marketplace update template && copilot plugin update jsc-template@template` +- `jsc-gitea`:取得 domain 名單(`tools/gitea.sh repos plugins`) +- `jsc-hooks`:deploy 完成後重新接線 hooks(`jsc-hooks:hooks-install`) -- 2.53.0 From 0f28babaaf0ff7cfcd22f025d6ea5665b34705d1 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 14:03:33 +0800 Subject: [PATCH 4/6] =?UTF-8?q?chore(cli):=20=E7=89=88=E6=9C=AC=E8=99=9F?= =?UTF-8?q?=E6=94=B9=E7=82=BA=200.0.1=20=E4=B8=A6=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=80=8B=E5=88=A5=20marketplace=EF=BC=88=E7=B5=B1=E4=B8=80?= =?UTF-8?q?=E7=82=BA=20jsc=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- .agents/plugins/marketplace.json | 12 ------------ .claude-plugin/marketplace.json | 14 -------------- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- plugin.json | 2 +- 5 files changed, 3 insertions(+), 29 deletions(-) delete mode 100644 .agents/plugins/marketplace.json delete mode 100644 .claude-plugin/marketplace.json diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json deleted file mode 100644 index b2772f9..0000000 --- a/.agents/plugins/marketplace.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "cli", - "plugins": [ - { - "name": "jsc-cli", - "source": { - "source": "url", - "url": "https://gitea.jsc.idv.tw/plugins/cli.git" - } - } - ] -} diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json deleted file mode 100644 index 20d4b79..0000000 --- a/.claude-plugin/marketplace.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "cli", - "description": "jsc 技能組 cli domain 的 marketplace。", - "owner": { - "name": "JSC" - }, - "plugins": [ - { - "name": "jsc-cli", - "source": "./", - "description": "CLI 偵測、模型能力標籤與技能庫批次部署" - } - ] -} diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 81aab37..75fa4ed 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-cli", - "version": "0.2.0", + "version": "0.0.1", "description": "CLI 偵測、模型能力標籤與技能庫批次部署", "skills": "./skills", "author": { diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 981a1df..e5039e6 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-cli", - "version": "0.2.0", + "version": "0.0.1", "description": "CLI 偵測、模型能力標籤與技能庫批次部署", "skills": "./skills" } diff --git a/plugin.json b/plugin.json index 5fb608e..ed9ebb1 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-cli", - "version": "0.2.0", + "version": "0.0.1", "description": "CLI 偵測、模型能力標籤與技能庫批次部署", "skills": "./skills/" } -- 2.53.0 From 4dccea8cf689a7f71af071a38ff6d9e9b7fa2cc1 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 14:03:33 +0800 Subject: [PATCH 5/6] =?UTF-8?q?feat(cli):=20deploy=20=E6=94=B9=E7=94=A8?= =?UTF-8?q?=E7=B5=B1=E4=B8=80=20marketplace=20jsc=EF=BC=88token=20jsc-{dom?= =?UTF-8?q?ain}@jsc=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- skills/deploy/SKILL.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/skills/deploy/SKILL.md b/skills/deploy/SKILL.md index 4d70b6d..83b2cdf 100644 --- a/skills/deploy/SKILL.md +++ b/skills/deploy/SKILL.md @@ -1,6 +1,6 @@ --- name: deploy -description: Batch install, update, or uninstall the whole jsc skill set on every installed AI CLI. Detect CLIs via detect-clis.sh, ask the user for the mode via decision tree, then run each CLI's native plugin commands per domain repo. Domain list comes from the plugins org on Gitea, never hardcoded. Use for rollout or removal of the jsc plugins; not for a single skill. +description: Batch install, update, or uninstall the whole jsc skill set on every installed AI CLI. Detect CLIs via detect-clis.sh, ask the user for the mode via decision tree, then run each CLI's native plugin commands with the unified jsc marketplace (token jsc-{domain}@jsc). Domain list comes from the plugins/jsc marketplace.json, never hardcoded. Use for rollout or removal of the jsc plugins; not for a single skill. --- # deploy — 技能庫批次安裝/更新/解除安裝 @@ -9,15 +9,17 @@ description: Batch install, update, or uninstall the whole jsc skill set on ever 1. `tools/detect-clis.sh` 找出已安裝的 CLI 與執行檔路徑。 2. 依 `jsc-ask:ask` 規則讓使用者選擇模式:`install` / `update` / `uninstall`(每個選項標明影響範圍:影響哪些 CLI、會寫入哪些設定)。 -3. 取得 domain 名單(**不可硬編碼**;技能組新增或刪除 domain 時本技能自動跟進):`jsc-gitea/tools/gitea.sh repos plugins` 列出存取庫,取「repo 根目錄的 `plugin.json` 存在且 `name` 為 `jsc-{domain}`」者。每個 domain repo 自帶 marketplace(名稱 = `{domain}`),plugin 名 = `jsc-{domain}`,安裝 token = `jsc-{domain}@{domain}`。 -4. 對每個 CLI × 每個 domain 執行對應指令(`{URL}` = `https://gitea.jsc.idv.tw/plugins/{domain}.git`),**必須以 sub agent 執行**(每個 CLI 一個 sub agent): +3. 取得 domain 名單(**不可硬編碼**;技能組新增或刪除 domain 時本技能自動跟進):讀統一 marketplace 的清單 + `jsc-gitea/tools/gitea.sh api GET /repos/plugins/jsc/raw/.claude-plugin/marketplace.json` 的 `plugins[].name`。 + Marketplace 統一為 `jsc`(`{MKT}` = `https://gitea.jsc.idv.tw/plugins/jsc.git`),安裝 token = `jsc-{domain}@jsc`。 +4. 對每個 CLI 執行對應指令(marketplace 每個 CLI 只 add 一次,之後逐 domain 安裝),**必須以 sub agent 執行**(每個 CLI 一個 sub agent): | CLI | install | update | uninstall | | --- | --- | --- | --- | -| claude | `claude plugin marketplace add {URL}` 後 `claude plugin install jsc-{domain}@{domain}` | `claude plugin marketplace update {domain}` 後 `claude plugin update jsc-{domain}@{domain}` | `claude plugin uninstall jsc-{domain}@{domain}` 後 `claude plugin marketplace remove {domain}` | -| codex | `codex plugin marketplace add {URL}` 後 `codex plugin add jsc-{domain}@{domain}` | `codex plugin marketplace upgrade {domain}` | `codex plugin remove jsc-{domain}@{domain}` 後 `codex plugin marketplace remove {domain}` | -| copilot | `copilot plugin marketplace add {URL}` 後 `copilot plugin install jsc-{domain}@{domain}` | `copilot plugin marketplace update {domain}` 後 `copilot plugin update jsc-{domain}@{domain}` | `copilot plugin uninstall jsc-{domain}@{domain}` 後 `copilot plugin marketplace remove {domain}` | -| antigravity | `git clone {URL} ~/plugins/{domain}` 後 `agy plugin install ~/plugins/{domain}`(agy 不支援 gitea URL 安裝) | `git -C ~/plugins/{domain} pull` 後先 `agy plugin uninstall jsc-{domain}` 再 install | `agy plugin uninstall jsc-{domain}` | +| claude | `claude plugin marketplace add {MKT}`,逐 domain `claude plugin install jsc-{domain}@jsc` | `claude plugin marketplace update jsc`,逐 domain `claude plugin update jsc-{domain}@jsc` | 逐 domain `claude plugin uninstall jsc-{domain}@jsc`,最後 `claude plugin marketplace remove jsc` | +| codex | `codex plugin marketplace add {MKT}`,逐 domain `codex plugin add jsc-{domain}@jsc` | `codex plugin marketplace upgrade jsc` | 逐 domain `codex plugin remove jsc-{domain}@jsc`,最後 `codex plugin marketplace remove jsc` | +| copilot | `copilot plugin marketplace add {MKT}`,逐 domain `copilot plugin install jsc-{domain}@jsc` | `copilot plugin marketplace update jsc`,逐 domain `copilot plugin update jsc-{domain}@jsc` | 逐 domain `copilot plugin uninstall jsc-{domain}@jsc`,最後 `copilot plugin marketplace remove jsc` | +| antigravity | 逐 domain `git clone https://gitea.jsc.idv.tw/plugins/{domain}.git ~/plugins/{domain}` 後 `agy plugin install ~/plugins/{domain}`(agy 不支援 gitea URL 安裝) | `git -C ~/plugins/{domain} pull` 後先 `agy plugin uninstall jsc-{domain}` 再 install | `agy plugin uninstall jsc-{domain}` | | kiro | 比照 copilot 的 plugin 指令(執行檔 `kiro-cli`);不支援時把 repo 的 `skills/` 複製到 kiro 的 skills 目錄 | 重新 pull 後重新複製 | 刪除對應 skills 目錄 | 5. 安裝或更新完成後呼叫 `jsc-hooks:hooks-install` 重新接線 hooks。 -- 2.53.0 From 0e51ce8d1ab0e350ba1fa60b041f108b5c321cd8 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 14:03:33 +0800 Subject: [PATCH 6/6] =?UTF-8?q?docs(cli):=20README=20=E5=AE=89=E8=A3=9D/?= =?UTF-8?q?=E6=9B=B4=E6=96=B0/=E7=A7=BB=E9=99=A4=E6=94=B9=E7=82=BA?= =?UTF-8?q?=E6=AF=8F=E6=8C=87=E4=BB=A4=E4=B8=80=E8=A1=8C=EF=BC=88=E4=BA=94?= =?UTF-8?q?=E5=80=8B=20CLI=EF=BC=89=E4=B8=A6=E7=82=BA=E7=9B=B8=E9=97=9C=20?= =?UTF-8?q?domain=20=E5=8A=A0=E4=B8=8A=20repo=20=E9=80=A3=E7=B5=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- README.md | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2be8f4b..f83d926 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,19 @@ jsc 技能組的 CLI domain:找出已安裝的 AI CLI、列出各 CLI 可用模型並加上能力標籤,以及對每個 CLI 批次安裝、更新、解除安裝整組 jsc plugins。 -## 安裝 +## 安裝 / 更新 / 移除 -```bash -claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/cli.git -claude plugin install jsc-cli@cli -``` +Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/jsc.git),安裝 token 為 `jsc-cli@jsc`。每個指令一行: -其他 CLI(codex / copilot / antigravity / kiro)與批次安裝、更新、解除安裝:使用 `/jsc-cli:deploy`。 +| CLI | 安裝 | 更新 | 移除 | +| --- | --- | --- | --- | +| claude | `claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/jsc.git && claude plugin install jsc-cli@jsc` | `claude plugin marketplace update jsc && claude plugin update jsc-cli@jsc` | `claude plugin uninstall jsc-cli@jsc` | +| codex | `codex plugin marketplace add https://gitea.jsc.idv.tw/plugins/jsc.git && codex plugin add jsc-cli@jsc` | `codex plugin marketplace upgrade jsc` | `codex plugin remove jsc-cli@jsc` | +| copilot | `copilot plugin marketplace add https://gitea.jsc.idv.tw/plugins/jsc.git && copilot plugin install jsc-cli@jsc` | `copilot plugin marketplace update jsc && copilot plugin update jsc-cli@jsc` | `copilot plugin uninstall jsc-cli@jsc` | +| antigravity | `git clone https://gitea.jsc.idv.tw/plugins/cli.git ~/plugins/cli && agy plugin install ~/plugins/cli` | `git -C ~/plugins/cli pull && agy plugin uninstall jsc-cli && agy plugin install ~/plugins/cli` | `agy plugin uninstall jsc-cli` | +| kiro | `kiro-cli plugin marketplace add https://gitea.jsc.idv.tw/plugins/jsc.git && kiro-cli plugin install jsc-cli@jsc` | `kiro-cli plugin marketplace update jsc && kiro-cli plugin update jsc-cli@jsc` | `kiro-cli plugin uninstall jsc-cli@jsc` | + +> antigravity 不支援 gitea URL 安裝,改用本地 clone 路徑。批次操作五個 CLI:使用 `/jsc-cli:deploy`。 ## 工具 @@ -29,11 +34,11 @@ claude plugin install jsc-cli@cli ### `deploy` -技能庫批次安裝 / 更新 / 解除安裝:偵測 CLI → 決策樹選模式 → 每個 CLI 一個 sub agent 執行原生 plugin 指令。domain 名單動態取自 gitea 的 plugins org,不硬編碼。 +技能庫批次安裝 / 更新 / 解除安裝:偵測 CLI → 決策樹選模式 → 每個 CLI 一個 sub agent 執行原生 plugin 指令(統一 marketplace `jsc`,token `jsc-{domain}@jsc`)。domain 名單動態取自 `plugins/jsc` 的 marketplace.json,不硬編碼。 ## 相關 domain -- `jsc-gitea`:取得 domain 名單(`tools/gitea.sh repos plugins`) -- `jsc-hooks`:deploy 完成後重新接線 hooks(`jsc-hooks:hooks-install`) +- [`jsc-gitea`](https://gitea.jsc.idv.tw/plugins/gitea):取得 domain 名單(`tools/gitea.sh repos plugins`) +- [`jsc-hooks`](https://gitea.jsc.idv.tw/plugins/hooks):deploy 完成後重新接線 hooks(`jsc-hooks:hooks-install`) -- 2.53.0