docs(README): 改用 Copilot CLI plugin 指令
This commit is contained in:
@@ -15,15 +15,15 @@
|
||||
| Codex | `codex plugin`(marketplace) | `$<name>` 或 `/skills` 選單 | ❌(用 `$name`) |
|
||||
| Antigravity | `agy plugin install` | `/jsc:<name>` 或自動觸發 | ✅ |
|
||||
| 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/`。
|
||||
|
||||
```
|
||||
generic/
|
||||
@@ -137,27 +137,27 @@ for s in ~/plugins/generic/skills/*/; do rm -rf "$HOME/.config/opencode/skills/$
|
||||
|
||||
- **呼叫**:直接描述需求,模型會依 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(把 generic plugin vendored 進 .github/jsc-plugins/generic)
|
||||
git clone https://gitea.jsc.idv.tw/plugins/generic.git .github/jsc-plugins/generic
|
||||
cp .github/jsc-plugins/generic/AGENTS.md AGENTS.md
|
||||
# 安裝
|
||||
copilot plugin marketplace add https://gitea.jsc.idv.tw/plugins/generic.git
|
||||
copilot plugin install jsc@generic
|
||||
|
||||
# 更新
|
||||
git -C .github/jsc-plugins/generic pull
|
||||
cp .github/jsc-plugins/generic/AGENTS.md AGENTS.md
|
||||
copilot plugin marketplace update generic
|
||||
copilot plugin update jsc@generic
|
||||
|
||||
# 移除
|
||||
git rm -r .github/jsc-plugins/generic
|
||||
# 若 AGENTS.md 只供此 plugin 使用,再移除;若已有其他內容,請只刪除 JSC generic 相關段落
|
||||
# git rm AGENTS.md
|
||||
copilot plugin uninstall jsc@generic
|
||||
copilot plugin marketplace remove generic
|
||||
```
|
||||
|
||||
- 也可把既有 `.github/copilot-instructions.md` 改成引用 `AGENTS.md` 與 `.github/jsc-plugins/generic/skills/<skill>/SKILL.md`。
|
||||
- **呼叫**:在 Copilot Chat/Coding Agent 任務中描述需求,例如「請依 `.github/jsc-plugins/generic/skills/spec-output/SKILL.md` 說明輸出規範」。
|
||||
- 安裝 token `jsc@generic` = plugin 名(plugin manifest 的 `name`)@ marketplace 名。
|
||||
- `copilot plugin marketplace add` 支援 GitHub `owner/repo`、git URL 與本地路徑;Gitea repo 可用上方 HTTPS URL。
|
||||
- **呼叫**:在 Copilot CLI 中用自然語言描述需求,例如 `copilot -i "請使用 spec-output 說明輸出規範"`。
|
||||
|
||||
---
|
||||
|
||||
@@ -171,11 +171,11 @@ git rm -r .github/jsc-plugins/generic
|
||||
| Codex | `codex exec "<prompt>"` | `codex exec '$spec-output'` |
|
||||
| Antigravity | `agy -p "<prompt>"` | `agy -p "/jsc:spec-output"` |
|
||||
| OpenCode | `opencode run "<message>"` | `opencode run "說明 JSC 共用輸出規範的內容"` |
|
||||
| GitHub Copilot | Copilot Chat / Coding Agent 任務 | `請依 .github/jsc-plugins/generic/skills/spec-output/SKILL.md 說明輸出規範` |
|
||||
| GitHub Copilot CLI | `copilot -p "<message>"` | `copilot -p "說明 JSC 共用輸出規範的內容"` |
|
||||
|
||||
- Claude / Antigravity 支援 `/jsc:` 前綴,直接 `-p "/jsc:<name>"` 即可。
|
||||
- Codex 以 `$<name>` 觸發;在 shell 請用**單引號**避免 `$` 被展開:`codex exec '$spec-output'`。
|
||||
- OpenCode 與 Copilot 沒有前綴,用自然語言描述需求;Copilot 任務中請明確指出要讀取的 `SKILL.md`。
|
||||
- OpenCode 與 Copilot 沒有前綴,用自然語言描述需求;Copilot CLI 會讀取已安裝 plugin 提供的 skills。
|
||||
- 帶引數就接在後面,例如 `claude -p "/jsc:spec-output 參數"`、`codex exec '$spec-output 參數'`。
|
||||
|
||||
---
|
||||
@@ -216,13 +216,13 @@ git rm -r .github/jsc-plugins/generic
|
||||
- `description`:第三人稱,寫清楚「何時用、何時不用」與觸發關鍵字 — 這是各助理自動載入的唯一依據。
|
||||
3. 在內文寫下 skill 的具體步驟。
|
||||
4. 手動把這個 skill 補進上方「Skills 目錄」區塊。
|
||||
5. **bump 版本並 push**:四家都以 git 內容/版本判斷更新,請把 `.claude-plugin/plugin.json`、`.codex-plugin/plugin.json`、`plugin.json` 三個 manifest 的 `version` 一起 bump(規則見 `skills/spec-plugin-version/`),commit 後 push 到 gitea。
|
||||
5. **bump 版本並 push**:各助理都以 git 內容/版本判斷更新,請把 `.claude-plugin/plugin.json`、`.codex-plugin/plugin.json`、`plugin.json` 三個 manifest 的 `version` 一起 bump(規則見 `skills/spec-plugin-version/`),commit 後 push 到 gitea。
|
||||
6. 讓各助理更新:
|
||||
- Claude:`claude plugin update jsc@generic`
|
||||
- Codex:`codex plugin marketplace upgrade generic`
|
||||
- Antigravity:`git -C ~/plugins/generic pull && agy plugin uninstall jsc && agy plugin install ~/plugins/generic`(路徑與上方 Antigravity 安裝節一致)
|
||||
- OpenCode:`git pull` 後重新複製 `skills/`
|
||||
- GitHub Copilot:更新 `.github/jsc-plugins/generic` 後同步 `AGENTS.md` 或 `.github/copilot-instructions.md`
|
||||
- Copilot:`copilot plugin marketplace update generic && copilot plugin update jsc@generic`
|
||||
|
||||
> **skill 帶可執行元件時**(腳本、hook)額外注意:
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user