From 9fa1abbb6fe2f762585a383704faf8beaf39d47b Mon Sep 17 00:00:00 2001 From: Jeffery Date: Mon, 27 Jul 2026 16:37:56 +0800 Subject: [PATCH] =?UTF-8?q?docs(README):=20=E6=94=B9=E7=94=A8=20Copilot=20?= =?UTF-8?q?CLI=20plugin=20=E6=8C=87=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 553f6f5..6d94c03 100644 --- a/README.md +++ b/README.md @@ -16,15 +16,15 @@ | Codex | `codex plugin`(marketplace) | `$` 或 `/skills` 選單 | ❌(用 `$name`) | | Antigravity | `agy plugin install` | `/jsc:` 或自動觸發 | ✅ | | OpenCode | skills 目錄(複製/clone) | 描述需求自動觸發 | ❌(依名稱) | -| GitHub Copilot | repository instructions(`AGENTS.md` / `.github/copilot-instructions.md`) | 描述需求並要求讀取對應 `SKILL.md` | ❌(依指示檔) | +| GitHub Copilot CLI | `copilot plugin`(marketplace) | 自然語言或 plugin skills | ❌(無 `/jsc:` 前綴) | -> Codex 不支援自訂前綴(skill 以 `$name` 呼叫);OpenCode 與 Copilot 由模型依描述與指示檔觸發。三者皆**不強制**前綴。 +> Codex 不支援自訂前綴(skill 以 `$name` 呼叫);OpenCode 由模型依描述自動呼叫;Copilot CLI 透過原生 plugin 安裝後以自然語言或 plugin skills 使用。三者皆**不強制**前綴。 --- ## 目錄結構 -同一個 repo 同時帶四種 manifest,彼此以路徑隔離、互不干擾;四家都讀同一份 `skills/`。 +同一個 repo 同時帶四種 manifest,彼此以路徑隔離、互不干擾;各助理都讀同一份 `skills/`。 ``` doc/ @@ -163,28 +163,28 @@ rm -rf ~/.config/opencode/skills/doc-docker ~/.config/opencode/skills/doc-funcs - **呼叫**:直接描述需求,模型會依 skill 描述自動透過 skill 工具呼叫。 -### GitHub Copilot +### GitHub Copilot CLI -GitHub Copilot 目前不是這類 `SKILL.md` plugin 的原生執行環境;安裝方式是把本 repo 作為 repository instructions 的來源,讓 Copilot 讀 `AGENTS.md` 與對應 `SKILL.md`。 +Copilot CLI 支援與 Claude Code 類似的原生 plugin / marketplace 指令,可直接從 marketplace 安裝、更新與移除本 plugin。 ```bash -# 安裝到目標 repo(把 doc plugin vendored 進 .github/jsc-plugins/doc) -git clone https://gitea.jsc.idv.tw/plugins/doc.git .github/jsc-plugins/doc -cp .github/jsc-plugins/doc/AGENTS.md AGENTS.md +# 安裝 +copilot plugin marketplace add https://gitea.jsc.idv.tw/plugins/doc.git +copilot plugin install jsc@doc # 更新 -git -C .github/jsc-plugins/doc pull -cp .github/jsc-plugins/doc/AGENTS.md AGENTS.md +copilot plugin marketplace update doc +copilot plugin update jsc@doc # 移除 -git rm -r .github/jsc-plugins/doc -# 若 AGENTS.md 只供此 plugin 使用,再移除;若已有其他內容,請只刪除 JSC doc 相關段落 -# git rm AGENTS.md +copilot plugin uninstall jsc@doc +copilot plugin marketplace remove doc ``` -- 也可把既有 `.github/copilot-instructions.md` 改成引用 `AGENTS.md` 與 `.github/jsc-plugins/doc/skills//SKILL.md`。 -- **呼叫**:在 Copilot Chat/Coding Agent 任務中描述需求,例如「請依 `.github/jsc-plugins/doc/skills/doc-funcs/SKILL.md` 執行文件化流程」。 -- Copilot 不會讀 Claude Code 的 `hooks/hooks.json`,因此 `worklog` 不支援自動 session stop 記錄。 +- 安裝 token `jsc@doc` = plugin 名(plugin manifest 的 `name`)@ marketplace 名。 +- `copilot plugin marketplace add` 支援 GitHub `owner/repo`、git URL 與本地路徑;Gitea repo 可用上方 HTTPS URL。 +- **呼叫**:在 Copilot CLI 中用自然語言描述需求,例如 `copilot -i "請使用 doc-docker 整理 docker-compose 註解"`。 +- `worklog` 的 Claude Code `Stop` hook 自動記錄仍只有 Claude Code 會讀取;Copilot CLI 可安裝 skill,但不會執行 Claude Code hook。 --- @@ -198,11 +198,11 @@ git rm -r .github/jsc-plugins/doc | Codex | `codex exec ""` | `codex exec '$doc-docker'` | | Antigravity | `agy -p ""` | `agy -p "/jsc:doc-docker"` | | OpenCode | `opencode run ""` | `opencode run "整理 docker-compose 註解"` | -| GitHub Copilot | Copilot Chat / Coding Agent 任務 | `請依 .github/jsc-plugins/doc/skills/doc-docker/SKILL.md 整理 docker-compose 註解` | +| GitHub Copilot CLI | `copilot -p ""` | `copilot -p "整理 docker-compose 註解"` | - Claude / Antigravity 支援 `/jsc:` 前綴,直接 `-p "/jsc:"` 即可。 - Codex 以 `$` 觸發;在 shell 請用**單引號**避免 `$` 被展開:`codex exec '$doc-docker'`。 -- OpenCode 與 Copilot 沒有前綴,用自然語言描述需求;Copilot 任務中請明確指出要讀取的 `SKILL.md`。 +- OpenCode 與 Copilot 沒有前綴,用自然語言描述需求;Copilot CLI 會讀取已安裝 plugin 提供的 skills。 - 帶引數就接在後面,例如 `claude -p "/jsc:doc-docker docker-compose.yaml"`、`codex exec '$doc-docker docker-compose.yaml'`。 --- @@ -274,10 +274,10 @@ git rm -r .github/jsc-plugins/doc - `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。 +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@doc` - Codex:`codex plugin marketplace upgrade doc` - Antigravity:`git -C ~/jsc-plugin pull && agy plugin uninstall jsc && agy plugin install ~/jsc-plugin` - OpenCode:`git pull` 後重新複製 `skills/` - - GitHub Copilot:更新 `.github/jsc-plugins/doc` 後同步 `AGENTS.md` 或 `.github/copilot-instructions.md` + - Copilot:`copilot plugin marketplace update doc && copilot plugin update jsc@doc`