From cc93b4a529f2befc1e69976dbe048f176fa50879 Mon Sep 17 00:00:00 2001 From: AI PLUGINS Date: Tue, 16 Jun 2026 09:08:19 +0000 Subject: [PATCH] Initial commit --- .agents/plugins/marketplace.json | 12 ++ .claude-plugin/marketplace.json | 14 +++ .claude-plugin/plugin.json | 12 ++ .codex-plugin/plugin.json | 6 + .gitignore | 10 ++ AGENTS.md | 15 +++ README.md | 189 +++++++++++++++++++++++++++++++ plugin.json | 6 + skills/hello/SKILL.md | 37 ++++++ 9 files changed, 301 insertions(+) create mode 100644 .agents/plugins/marketplace.json create mode 100644 .claude-plugin/marketplace.json create mode 100644 .claude-plugin/plugin.json create mode 100644 .codex-plugin/plugin.json create mode 100644 .gitignore create mode 100644 AGENTS.md create mode 100644 README.md create mode 100644 plugin.json create mode 100644 skills/hello/SKILL.md diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json new file mode 100644 index 0000000..6ee2692 --- /dev/null +++ b/.agents/plugins/marketplace.json @@ -0,0 +1,12 @@ +{ + "name": "jsc-plugins", + "plugins": [ + { + "name": "jsc", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/template.git" + } + } + ] +} diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 0000000..899e2e8 --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,14 @@ +{ + "name": "jsc-plugins", + "description": "JSC 跨 AI 助理共用 skills 的 Claude Code marketplace。", + "owner": { + "name": "JSC" + }, + "plugins": [ + { + "name": "jsc", + "source": "./", + "description": "JSC 共用 skills(跨 AI 助理)" + } + ] +} diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..51978fa --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,12 @@ +{ + "name": "jsc", + "version": "0.1.0", + "description": "JSC 跨 AI 助理共用 plugin 模板(Claude Code / Codex / Antigravity / OpenCode)。所有 skills 以 SKILL.md 為共通標準,於 Claude Code 以 /jsc: 前綴呼叫。", + "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"] +} diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json new file mode 100644 index 0000000..2457172 --- /dev/null +++ b/.codex-plugin/plugin.json @@ -0,0 +1,6 @@ +{ + "name": "jsc", + "version": "0.1.0", + "description": "JSC 跨 AI 助理共用 plugin 模板。所有 skills 以 SKILL.md 為共通標準。", + "skills": "./skills" +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..710e336 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# OS / editor +.DS_Store +Thumbs.db +*.swp +.idea/ +.vscode/ + +# 暫存 +*.tmp +*.log diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..d84fb8b --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,15 @@ +# jsc — 共用 Skills(跨 AI 助理) + +本 repo 是一組以 **Agent Skills(`SKILL.md`)** 標準撰寫的共用 skills,可同時被 Claude Code、Codex、Antigravity、OpenCode 使用。 + +## 給 AI 助理的指引 + +- 所有可用的 skills 位於本 repo 的 `skills//SKILL.md`。 +- 在處理任務前,先比對使用者需求與各 skill `SKILL.md` frontmatter 的 `description`,若相符請載入並依其步驟執行。 +- **呼叫慣例**:在 Claude Code 與 Antigravity 中,這些 skill 以 `/jsc:` 呼叫;Codex 以 `$`、OpenCode 由模型依描述自動觸發 — 兩者沒有 `/jsc:` 前綴,不需強制加。 +- 完整清單與每個 skill 的用途,請見 `README.md` 的「Skills 目錄」。 + +## 慣例 + +- 新增 skill 一律放在 `skills//`,且 `` 使用小寫與連字號。 +- `description` 要寫清楚觸發條件(何時用、何時不用),這是跨助理自動載入的唯一依據。 diff --git a/README.md b/README.md new file mode 100644 index 0000000..b5a3719 --- /dev/null +++ b/README.md @@ -0,0 +1,189 @@ +# jsc — 跨 AI 助理 Plugin 模板 + +一個可同時被 **Claude Code、Codex、Antigravity、OpenCode** 安裝的 plugin 模板。 +核心是以 [Agent Skills(`SKILL.md`)](https://agentskills.io) 標準撰寫的共用 skills(唯一真實來源放在 `skills/`), +搭配各助理各自的 plugin manifest,讓**同一個 repo** 可用各家**原生 plugin CLI** 安裝。 +在 Claude Code 與 Antigravity 中,skill 以 **`/jsc:` 前綴**呼叫(例如 `/jsc:hello`)。 + +--- + +## 前綴與呼叫方式 + +| 助理 | 安裝方式 | 呼叫 | `/jsc:` 前綴 | +| --- | --- | --- | --- | +| Claude Code | `claude plugin`(marketplace) | `/jsc:` 或自動觸發 | ✅ | +| Codex | `codex plugin`(marketplace) | `$` 或 `/skills` 選單 | ❌(用 `$name`) | +| Antigravity | `agy plugin install` | `/jsc:` 或自動觸發 | ✅ | +| OpenCode | skills 目錄(複製/clone) | 描述需求自動觸發 | ❌(依名稱) | + +> Codex 不支援自訂前綴(skill 以 `$name` 呼叫);OpenCode 由模型依描述自動呼叫。兩者皆**不強制**前綴。 + +--- + +## 目錄結構 + +同一個 repo 同時帶四種 manifest,彼此以路徑隔離、互不干擾;四家都讀同一份 `skills/`。 + +``` +template/ +├── .claude-plugin/ +│ ├── plugin.json # Claude 外掛定義(name: "jsc") +│ └── marketplace.json # Claude marketplace(name: "jsc-plugins",source 指向本 repo) +├── .codex-plugin/ +│ └── plugin.json # Codex 外掛定義(name: "jsc",skills: "./skills") +├── .agents/plugins/ +│ └── marketplace.json # Codex marketplace(name: "jsc-plugins",url source 指向本 repo) +├── plugin.json # Antigravity 外掛定義(name: "jsc",skills: "./skills/") +├── skills/ # ★ 唯一真實來源:所有 skills +│ └── hello/SKILL.md +├── AGENTS.md # 跨助理共用指引 +└── README.md +``` + +--- + +## 安裝 / 更新 / 移除(各家原生 plugin CLI) + +> 指令中的 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 用本地路徑安裝。 + +### Claude Code + +```bash +# 安裝 +claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/template.git +claude plugin install jsc@jsc-plugins + +# 更新 +claude plugin marketplace update jsc-plugins +claude plugin update jsc@jsc-plugins + +# 移除 +claude plugin uninstall jsc@jsc-plugins +claude plugin marketplace remove jsc-plugins +``` + +- 工作階段內 slash 版(等價):把 `claude plugin` 換成 `/plugin`。 +- 本機開發(免 push):`claude plugin marketplace add C:\Users\h3285\source\repos.plugins\template`(本地路徑)後再 install。 +- **呼叫**:`/jsc:`(例 `/jsc:hello`)。 + +### Codex + +```bash +# 安裝 +codex plugin marketplace add https://gitea.jsc.idv.tw/plugins/template.git +codex plugin add jsc@jsc-plugins + +# 更新(重新抓取 marketplace 的 git 快照) +codex plugin marketplace upgrade jsc-plugins + +# 移除 +codex plugin remove jsc@jsc-plugins +codex plugin marketplace remove jsc-plugins +``` + +- 安裝 token `jsc@jsc-plugins` = 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 ~/jsc-plugin +agy plugin install ~/jsc-plugin + +# 更新(agy 無 update 子指令 → git pull 後重裝) +git -C ~/jsc-plugin pull +agy plugin uninstall jsc +agy plugin install ~/jsc-plugin + +# 移除 +agy plugin uninstall jsc +``` + +- 若把 skills 放到 GitHub,則可直接 `agy plugin install https://github.com//`。 +- 其他:`agy plugin list`、`agy plugin enable jsc` / `disable jsc`、`agy plugin validate `。安裝後重啟工作階段。 +- **呼叫**:`/jsc:`(例 `/jsc: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 ~/jsc-plugin +mkdir -p ~/.config/opencode/skills +cp -r ~/jsc-plugin/skills/* ~/.config/opencode/skills/ + +# 更新 +git -C ~/jsc-plugin pull +cp -r ~/jsc-plugin/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 工具呼叫。 + +--- + +## 用 CLI 直接執行 skill(headless / 一次性) + +安裝好之後,不必進互動介面,一行指令就能叫某個 skill 跑完並印出結果: + +| 助理 | headless 指令 | 執行 `hello` skill | +| --- | --- | --- | +| Claude Code | `claude -p ""` | `claude -p "/jsc:hello"` | +| Codex | `codex exec ""` | `codex exec '$hello'` | +| Antigravity | `agy -p ""` | `agy -p "/jsc:hello"` | +| OpenCode | `opencode run ""` | `opencode run "用 hello skill 打個招呼"` | + +- Claude / Antigravity 支援 `/jsc:` 前綴,直接 `-p "/jsc:"` 即可。 +- Codex 以 `$` 觸發;在 shell 請用**單引號**避免 `$` 被展開:`codex exec '$hello'`。 +- OpenCode 沒有前綴,用自然語言描述需求,模型會自動透過 skill 工具呼叫。 +- 帶引數就接在後面,例如 `claude -p "/jsc:hello 參數"`、`codex exec '$hello 參數'`。 + +--- + +## Skills 目錄 + +> 此區塊列出本 plugin 內含的所有 skills(名稱/描述/使用方法)。 +> 新增或修改 skill 後,請同步手動更新標記之間的內容。 + + + +### `hello` + +範例 skill,用來驗證 jsc plugin 是否安裝成功,也是新增 skill 的範本。當使用者輸入 hello、想測試 plugin、或想看 skill 模板長什麼樣子時觸發;回覆一句問候並簡述此 plugin 的用途。 + +- **Claude Code / Antigravity**:`/jsc:hello` +- **Codex**:`$hello`,或用 `/skills` 選單 +- **OpenCode**:描述需求自動觸發 + + + +--- + +## 新增一個 skill + +1. 複製範本:`cp -r skills/hello skills/` +2. 編輯 `skills//SKILL.md` 的 frontmatter: + - `name`:小寫、數字、連字號(`-`),最長 64 字元。**這就是 Claude Code / Antigravity 的 `/jsc:`**。 + - `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@jsc-plugins` + - Codex:`codex plugin marketplace upgrade jsc-plugins` + - Antigravity:`git -C ~/jsc-plugin pull && agy plugin uninstall jsc && agy plugin install ~/jsc-plugin` + - OpenCode:`git pull` 後重新複製 `skills/` diff --git a/plugin.json b/plugin.json new file mode 100644 index 0000000..9bc4496 --- /dev/null +++ b/plugin.json @@ -0,0 +1,6 @@ +{ + "name": "jsc", + "version": "0.1.0", + "description": "JSC 跨 AI 助理共用 plugin 模板。所有 skills 以 SKILL.md 為共通標準;於 Antigravity 以 /jsc: 前綴呼叫。", + "skills": "./skills/" +} \ No newline at end of file diff --git a/skills/hello/SKILL.md b/skills/hello/SKILL.md new file mode 100644 index 0000000..4e54c6c --- /dev/null +++ b/skills/hello/SKILL.md @@ -0,0 +1,37 @@ +--- +name: hello +description: 範例 skill,用來驗證 jsc plugin 是否安裝成功,也是新增 skill 的範本。當使用者輸入 hello、想測試 plugin、或想看 skill 模板長什麼樣子時觸發;回覆一句問候並簡述此 plugin 的用途。 +--- + +# hello(範例 skill) + +這是 `jsc` plugin 的範例 skill。它有兩個用途: + +1. **驗證安裝** — 跨各家 AI 助理確認 skill 已被正確載入。 +2. **作為範本** — 複製這個資料夾即可新增一個新的 skill。 + +## 呼叫方式 + +| 助理 | 呼叫方式 | +| --- | --- | +| Claude Code | `/jsc:hello` | +| Antigravity | `/jsc:hello`,或描述需求自動觸發 | +| Codex | 在提示詞輸入 `$hello`,或用 `/skills` 選單 | +| OpenCode | 直接描述需求,模型會透過 skill 工具自動呼叫 | + +## 行為 + +當這個 skill 被觸發時: + +1. 回覆「Hello from **jsc** 👋」。 +2. 用一句話說明 `jsc` 是一個跨 AI 助理的共用 skill 集合。 +3. 提示使用者可以在 README 的「Skills 目錄」查看所有可用的 skills。 + +## 如何以此為範本新增 skill + +1. 複製 `skills/hello/` 為 `skills//`。 +2. 修改 `SKILL.md` 的 frontmatter: + - `name`:小寫、數字、連字號(`-`),最長 64 字元。**這個名稱會成為 Claude Code / Antigravity 的 `/jsc:` 指令**。 + - `description`:第三人稱,寫清楚「什麼時候該用、什麼時候不該用」與觸發關鍵字 — 各家助理靠這段文字決定是否自動載入。 +3. 在內文寫下 skill 的具體步驟。 +4. 手動把新 skill 補進 README 的「Skills 目錄」區塊。