refactor(code): 接上 shared 共用規範,去除重抄段落並補模型檢查串接

依 todo.md 執行的規範治理專案:action-composite/action-docker/action-node/
image/issues/nuget/review-resolve/sync/target 九個 skill 改為引用
shared 新增的共用 spec(conventional-commit、pull-request、git-push、
git-safety 分支選擇、issue-read、todo-list、ask-user、action-scaffold、
node-src-layout、skill-invocation),移除大量重抄內容(review-resolve/
target 光是 commit/PR/push 三塊就精簡約 175 行);target/issues 補上讀到
帶 model: frontmatter 清單檔時依 /jsc-shared:spec-model 做模型檢查的規則。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-11 06:04:18 +00:00
co-authored by Claude Sonnet 5
parent 9d8ac26a3b
commit 85a4128f5e
14 changed files with 215 additions and 671 deletions
+10 -110
View File
@@ -54,117 +54,16 @@ code/
## 安裝 / 更新 / 移除(各助理)
> 指令中的 repo 網址換成你的:`https://gitea.jsc.idv.tw/plugins/code.git`
> 完整的安裝/更新/移除指令(Claude Code、Codex、Antigravity、OpenCode、GitHub Copilot CLI 五種助理),一律以 [`/jsc-shared:spec-plugin-cli`](https://gitea.jsc.idv.tw/plugins/shared/src/branch/master/skills/spec-plugin-cli/SKILL.md) 為唯一權威版本,套用時代入下列佔位符:
>
> **Claude / Codex 從 git URL 安裝(會 clone 遠端),請先把本 repo `push` 到 gitea。**
> **Antigravity 的 `agy plugin install <url>` 目前只支援 github.com**;gitea 請改用「clone + 本地路徑」(見 Antigravity 節)。
> 本機/離線:Claude 可用本地路徑加 marketplace;Antigravity 用本地路徑安裝。
### Claude Code
```bash
# 安裝
claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/code.git
claude plugin install jsc-code@code
# 更新
claude plugin marketplace update code
claude plugin update jsc-code@code
# 移除
claude plugin uninstall jsc-code@code
claude plugin marketplace remove code
```
- 工作階段內 slash 版(等價):把 `claude plugin` 換成 `/plugin`。
- 本機開發(免 push):`claude plugin marketplace add C:\Users\h3285\source\repos.plugins\code`(本地路徑)後再 install。
- **呼叫**:`/jsc-code:<name>`(例 `/jsc-code:issues`)。
### Codex
```bash
# 安裝
codex plugin marketplace add https://gitea.jsc.idv.tw/plugins/code.git
codex plugin add jsc-code@code
# 更新(重新抓取 marketplace 的 git 快照)
codex plugin marketplace upgrade code
# 移除
codex plugin remove jsc-code@code
codex plugin marketplace remove code
```
- 安裝 token `jsc-code@code` = plugin 名(`.codex-plugin/plugin.json` 的 `name`)@ marketplace 名(`.agents/plugins/marketplace.json` 的 `name`)。
- 本 repo 的 Codex marketplace 以 `url` 來源指向自己,故 Codex **一律從 gitea 安裝**(需先 push);安裝後重啟 Codex。
- **呼叫**:`$<name>`(例 `$issues`),或用 `/skills` 選單。
### Antigravity(`agy`)
> `agy plugin install <url>` 目前**只支援 github.com**;gitea 等自架 git 不支援 URL 安裝,請先 `git clone` 再用**本地路徑**安裝。
```bash
# 安裝:clone 後用本地路徑
git clone https://gitea.jsc.idv.tw/plugins/code.git ~/plugins/code
agy plugin install ~/plugins/code
# 更新(agy 無 update 子指令 → git pull 後重裝)
git -C ~/plugins/code pull
agy plugin uninstall jsc-code
agy plugin install ~/plugins/code
# 移除
agy plugin uninstall jsc-code
```
- 若把 skills 放到 GitHub,則可直接 `agy plugin install https://github.com/<owner>/<repo>`。
- 其他:`agy plugin list`、`agy plugin enable jsc-code` / `disable jsc-code`、`agy plugin validate <path>`。安裝後重啟工作階段。
- **呼叫**:`/jsc-code:<name>`(例 `/jsc-code:issues`)或依描述自動觸發。
### OpenCode
OpenCode 的「plugin」是 TypeScript/npm 套件,不適用於 skill 包;skills 改用**目錄安裝**。
OpenCode 會讀 `~/.config/opencode/skills/`(也會讀 `~/.claude/skills/`、`~/.agents/skills/`)。
```bash
# 安裝
git clone https://gitea.jsc.idv.tw/plugins/code.git ~/plugins/code
mkdir -p ~/.config/opencode/skills
cp -r ~/plugins/code/skills/* ~/.config/opencode/skills/
# 更新
git -C ~/plugins/code pull
cp -r ~/plugins/code/skills/* ~/.config/opencode/skills/
# 移除
rm -rf ~/.config/opencode/skills/{review-resolve,issues,nuget,sync,action-docker,action-composite,action-node,image,target}
```
> **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/code.git
copilot plugin install jsc-code@code
# 更新
copilot plugin marketplace update code
copilot plugin update jsc-code@code
# 移除
copilot plugin uninstall jsc-code@code
copilot plugin marketplace remove code
```
- 安裝 token `jsc-code@code` = plugin 名(plugin manifest 的 `name`)@ marketplace 名。
- `copilot plugin marketplace add` 支援 GitHub `owner/repo`、git URL 與本地路徑;Gitea repo 可用上方 HTTPS URL。
- **呼叫**:在 Copilot CLI 中用自然語言描述需求,例如 `copilot -i "請使用 issues 處理 plugins/code 的 12、15 號議題"`。
> | 佔位符 | 值 |
> | --- | --- |
> | `<host>` | `gitea.jsc.idv.tw` |
> | `<name>` | `code` |
> | `<plugin>` | `jsc-code` |
> | `<marketplace>` | `code` |
> | `<token>`(= `<plugin>@<marketplace>`) | `jsc-code@code` |
> | `<url>` | `https://gitea.jsc.idv.tw/plugins/code.git` |
---
@@ -303,3 +202,4 @@ copilot plugin marketplace remove code
- Antigravity:`git -C ~/plugins/code pull && agy plugin uninstall jsc-code && agy plugin install ~/plugins/code`
- OpenCode:`git pull` 後重新複製 `skills/`
- Copilot:`copilot plugin marketplace update code && copilot plugin update jsc-code@code`