feat(cli): 匯入 jsc-cli 技能組並統一 marketplace 為 jsc #2

Merged
admin merged 11 commits from develop into master 2026-08-21 06:41:01 +00:00
4 changed files with 101 additions and 0 deletions
Showing only changes of commit 8c00934867 - Show all commits
+37
View File
@@ -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` 規則詢問使用者或依供應商文件補表後再判定。
+24
View File
@@ -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 × 模式的結果與失敗原因。
+24
View File
@@ -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` 各技能做模型能力檢查。
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env sh
# detect-clis.sh — 找出已安裝的 AI CLI 工具與執行檔路徑。
# 輸出(TSV): name<TAB>path<TAB>version(未安裝的不輸出)
# 支援: 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