jsc-shared — 跨 AI 助理共用規範 Plugin

一個可同時被 Claude Code、Codex、Antigravity、OpenCode、GitHub Copilot 使用的共用規範 plugin。 核心是以 Agent SkillsSKILL.md 標準撰寫的共用 skills(唯一真實來源放在 skills/), 搭配各助理各自的 plugin manifest,讓同一個 repo 可用各家原生 plugin CLI 安裝。 在 Claude Code 與 Antigravity 中,skill 以 /jsc-shared: 前綴呼叫(例如 /jsc-shared:spec-output)。


前綴與呼叫方式

助理 安裝方式 呼叫 /jsc-shared: 前綴
Claude Code claude pluginmarketplace /jsc-shared:<name> 或自動觸發
Codex codex pluginmarketplace $<name>/skills 選單 (用 $name
Antigravity agy plugin install /jsc-shared:<name> 或自動觸發
OpenCode skills 目錄(先 clone 到工具專屬資料夾,再依 README 匯入) 描述需求自動觸發 (依名稱)
GitHub Copilot CLI copilot pluginmarketplace 自然語言或 plugin skills (無 /jsc-shared: 前綴)

Codex 不支援自訂前綴(skill 以 $name 呼叫);OpenCode 由模型依描述自動呼叫;Copilot CLI 透過原生 plugin 安裝後以自然語言或 plugin skills 使用。三者皆不強制前綴。


目錄結構

同一個 repo 同時帶四種 manifest,彼此以路徑隔離、互不干擾;各助理都讀同一份 skills/

shared/
├── .claude-plugin/
│   ├── plugin.json          # Claude 外掛定義(name: "jsc-shared"
│   └── marketplace.json     # Claude marketplacename: "shared"source 指向本 repo
├── .codex-plugin/
│   └── plugin.json          # Codex 外掛定義(name: "jsc-shared"skills: "./skills"
├── .agents/plugins/
│   └── marketplace.json     # Codex marketplacename: "shared"url source 指向本 repo
├── plugin.json              # Antigravity 外掛定義(name: "jsc-shared"skills: "./skills/"
├── skills/                  # ★ 唯一真實來源:所有 skills
│   ├── spec-*/SKILL.md      # 共用規範 skills(一規範一目錄)
│   ├── plugins-install/     # 一次安裝/更新 jsc-code、jsc-doc、jsc-persona
│   └── plugins-uninstall/   # 一次移除 jsc-code、jsc-doc、jsc-persona、jsc-shared
├── AGENTS.md                # 跨助理共用指引
└── README.md

shared 的定位是「共用規範」:skills/spec-* 是 codedoc plugins 共用的流程與安全規範。工作紀錄自動化 worklog 已移到 doc plugin。 例外只有 plugins-installplugins-uninstall 兩類:它們是整組 plugin 的安裝管理,一次處理所有 JSC plugin,不必逐個 repo 翻 README。


安裝 / 更新 / 移除(各助理)

指令中的 repo 網址換成你的:https://gitea.jsc.idv.tw/plugins/shared.git

Claude / Codex 從 git URL 安裝(會 clone 遠端),請先把本 repo push 到 gitea。 Antigravity 的 agy plugin install <url> 目前只支援 github.com;gitea 請依本節改用「從遠端重新抓取到暫存目錄,再用本地路徑安裝」。 本 repo 的安裝/更新/移除流程一律以 Gitea 遠端檔案與下方 README 章節為準,不依賴既有本機存取庫。

Claude Code

# 安裝
claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/shared.git
claude plugin install jsc-shared@shared

# 更新
claude plugin marketplace update shared
claude plugin update jsc-shared@shared

# 移除
claude plugin uninstall jsc-shared@shared
claude plugin marketplace remove shared
  • 工作階段內 slash 版(等價):把 claude plugin 換成 /plugin
  • 本機開發(免 push)仍可用本地路徑,但正式安裝請以 Gitea 遠端 README 為準。
  • 呼叫/jsc-shared:<name>(例 /jsc-shared:spec-output)。

Codex

# 安裝
codex plugin marketplace add https://gitea.jsc.idv.tw/plugins/shared.git
codex plugin add jsc-shared@shared

# 更新(重新抓取 marketplace 的 git 快照)
codex plugin marketplace upgrade shared

# 移除
codex plugin remove jsc-shared@shared
codex plugin marketplace remove shared
  • 安裝 token jsc-shared@shared = plugin 名(.codex-plugin/plugin.jsonname@ marketplace 名(.agents/plugins/marketplace.jsonname)。
  • 本 repo 的 Codex marketplace 以 url 來源指向自己,故 Codex 一律從 gitea 安裝(需先 push);安裝後重啟 Codex。
  • 呼叫$<name>(例 $spec-output),或用 /skills 選單。

Antigravityagy

agy plugin install <url> 目前只支援 github.comgitea 等自架 git 不支援 URL 安裝,請先從遠端抓到暫存目錄,再用本地路徑安裝。

# 安裝:先從遠端抓到暫存目錄,再用本地路徑
git clone --depth 1 https://gitea.jsc.idv.tw/plugins/shared.git /tmp/jsc-shared
agy plugin install /tmp/jsc-shared

# 更新(重新抓取遠端後重裝)
git clone --depth 1 https://gitea.jsc.idv.tw/plugins/shared.git /tmp/jsc-shared
agy plugin uninstall jsc-shared
agy plugin install /tmp/jsc-shared

# 移除
agy plugin uninstall jsc-shared
  • 若把 skills 放到 GitHub,則可直接 agy plugin install https://github.com/<owner>/<repo>
  • 不讀取既有本機 repo;若需要對照 README,只用遠端 checkout 的暫存工作區。
  • 其他:agy plugin listagy plugin enable jsc-shared / disable jsc-sharedagy plugin validate <path>。安裝後重啟工作階段。
  • 呼叫/jsc-shared:<name>(例 /jsc-shared:spec-output)或依描述自動觸發。

無 plugin 指令但可使用 skill 的助理

以 OpenCode 為例,這類工具不走原生 plugin install / uninstall,而是:

  1. 先把整組 skill clone 到工具的專屬資料夾。
  2. 再依技能組自己的 README.md,把技能匯入到 README 指定的位置。
  3. 移除時則反向刪除 README 指定的那些 skill 目錄。

OpenCode 會讀 ~/.config/opencode/skills/(也會讀 ~/.claude/skills/~/.agents/skills/),因此可把技能匯入這些位置。

# 安裝
git clone --depth 1 https://gitea.jsc.idv.tw/plugins/shared.git /tmp/jsc-shared
mkdir -p ~/.config/opencode/skills
cp -r /tmp/jsc-shared/skills/* ~/.config/opencode/skills/

# 更新
git clone --depth 1 https://gitea.jsc.idv.tw/plugins/shared.git /tmp/jsc-shared
cp -r /tmp/jsc-shared/skills/* ~/.config/opencode/skills/

# 移除(逐一移除本 plugin 帶入的 skill 目錄;勿只清 spec-*,否則其他 skill 會殘留)
for s in /tmp/jsc-shared/skills/*/; do rm -rf "$HOME/.config/opencode/skills/$(basename "$s")"; done

Windows PowerShellcp -r A BCopy-Item A B -Recurse -Forcerm -rf XRemove-Item X -Recurse -Force~$HOME

  • 呼叫:直接描述需求,模型會依 skill 描述自動透過 skill 工具呼叫。

GitHub Copilot CLI

Copilot CLI 支援與 Claude Code 類似的原生 plugin / marketplace 指令,可直接從 marketplace 安裝、更新與移除本 plugin。

# 安裝
copilot plugin marketplace add https://gitea.jsc.idv.tw/plugins/shared.git
copilot plugin install jsc-shared@shared

# 更新
copilot plugin marketplace update shared
copilot plugin update jsc-shared@shared

# 移除
copilot plugin uninstall jsc-shared@shared
copilot plugin marketplace remove shared
  • 安裝 token jsc-shared@shared = plugin 名(plugin manifest 的 name@ marketplace 名。
  • copilot plugin marketplace add 支援 GitHub owner/repo、git URL 與本地路徑;Gitea repo 可用上方 HTTPS URL。
  • 呼叫:在 Copilot CLI 中用自然語言描述需求,例如 copilot -i "請使用 spec-output 說明輸出規範"

用 CLI 直接執行 skillheadless / 一次性)

安裝好之後,不必進互動介面,一行指令就能叫某個 skill 跑完並印出結果:

助理 headless 指令 執行 spec-output skill
Claude Code claude -p "<prompt>" claude -p "/jsc-shared:spec-output"
Codex codex exec "<prompt>" codex exec '$spec-output'
Antigravity agy -p "<prompt>" agy -p "/jsc-shared:spec-output"
OpenCode opencode run "<message>" opencode run "說明 JSC 共用輸出規範的內容"
GitHub Copilot CLI copilot -p "<message>" copilot -p "說明 JSC 共用輸出規範的內容"
  • Claude / Antigravity 支援 /jsc-shared: 前綴,直接 -p "/jsc-shared:<name>" 即可。
  • Codex 以 $<name> 觸發;在 shell 請用單引號避免 $ 被展開:codex exec '$spec-output'
  • OpenCode 與 Copilot 沒有前綴,用自然語言描述需求;Copilot CLI 會讀取已安裝 plugin 提供的 skills。
  • 帶引數就接在後面,例如 claude -p "/jsc-shared:spec-output 參數"codex exec '$spec-output 參數'

Skills 目錄

此區塊列出本 plugin 內含的所有 skills(名稱/描述/使用方法)。 新增或修改 skill 後,請同步手動更新標記之間的內容。

共用規範(spec-*

以下 skills 是 codedoc plugins 各 skill 引用的共用規範:其他 skill 內文以 /jsc-shared:spec-<name> 引用時載入;也可單獨呼叫查看規範內容。

Skill 類型 內容
spec-output 輸出規範 繁體中文(台灣用語)、UTF-8 無 BOM 無亂碼、表格與 Mermaid 呈現、subagent 提示需帶入本規範
spec-execution 執行原則 自動執行原則(必要決策才中斷、已知資訊跳過詢問)、不臆測/需人工確認、不擴及無關檔案
spec-gitea Gitea 工具 teaAPI 工具選擇與檢查、GITEA_TOKEN 機密保護、不依賴 jq、API 分頁與 UTF-8 JSON body、host 決定順序
spec-git-safety Git 安全 不破壞既有工作(絕不 reset --hardclean)、git mv 保留歷史、develop → master 後備、pull --ff-only、保守解衝突
spec-time-log 時間與訊息 Asia/Taipei yyyy/MM/dd HH:mm:ss 更新時間與統一同步、[時間][階段][等級]: 訊息 log 格式、一行一則
spec-action-params Action 參數 action 參數來源優先序(context/環境變數 → inputs)、secretsvars 一律視為不可用
spec-dockerfile Dockerfile 六步流程(參數→安裝→複製→執行→縮小→入口)、多階段建置、固定版號、對外契約不動、自我檢查
spec-project-board Gitea 看板 進度欄位語意對應、建議欄位規則、GET 探測(404/501 不支援)、不往回移、不得新建欄位
spec-doc-funcs-handoff 文件化串接 code 類 skill 完成後完整執行 /jsc-doc:funcs 的標準流程與統一時間戳
spec-plugin-version 版號規則 三 manifest 同步 bump、以 master 為基準計算同一 PR 的最終版本、新 plugin 首發 0.0.1、patch 到 9 後進位 minor、chore(plugin 版本) commit

整組 plugin 安裝管理

一次操作所有 JSC plugin,不必逐個 repo 翻 README 的安裝章節。四家原生 plugin CLI(claudecodexcopilotagy)都支援,OpenCode 走複製/刪除 skills 目錄。

Skill 用途 使用方法
plugins-install 一次安裝或更新 jsc-codejsc-docjsc-personajsc-shared:先盤點每個 plugin 已安裝或未安裝,未安裝就安裝、已安裝就更新到最新,最後以表格回報動作、位置、結果與版本。agy 走 clone+本地路徑安裝;OpenCode 這類沒有 plugin 匯入指令、但可使用 skill 的助理先把技能組 clone 到工具專屬資料夾,再依技能組 README.md 匯入到指定位置,已安裝就在該路徑就地更新、未安裝才放進工具的全域資料夾 /jsc-shared:plugins-install;可帶 --assistant claude|codex|copilot|agy|opencode--plugins code,doc,persona,shared--host <gitea 主機>--clone-dir <目錄>--yes
plugins-uninstall 一次移除 jsc-codejsc-docjsc-personajsc-shared:動手前先列出將被移除的項目與不會被碰的資料請使用者確認,移除順序固定把 jsc-shared 放最後(本 skill 就住在裡面)。人格倉庫與記憶目錄一律不刪;OpenCode 這類沒有 plugin 匯入指令、但可使用 skill 的助理則依技能組 README.md 反向刪除匯入位置 /jsc-shared:plugins-uninstall;可帶 --assistant …--plugins code,doc,persona,shared--keep-marketplace--yes

plugins-installplugins-uninstall 都會處理 jsc-shared;移除時一定放最後一步。


元件對各助理的適用範圍

skills/ 各助理都能用。

元件 Claude Code Codex Antigravity OpenCode GitHub Copilot
skills/spec-*(純規範)
skills/plugins-installplugins-uninstall ⚠️ 只能操作 OpenCode 自己
cron 睡眠整理(系統排程)

OpenCode 以複製 skills/ 目錄安裝


新增一個 skill

  1. 複製既有 skill 作範本:cp -r skills/spec-output skills/<your-skill-name>
  2. 編輯 skills/<your-skill-name>/SKILL.md 的 frontmatter
    • name:小寫、數字、連字號(-),最長 64 字元。這就是 Claude Code / Antigravity 的 /jsc-shared:<name>
    • description:第三人稱,寫清楚「何時用、何時不用」與觸發關鍵字 — 這是各助理自動載入的唯一依據。
  3. 在內文寫下 skill 的具體步驟。
  4. 手動把這個 skill 補進上方「Skills 目錄」區塊。
  5. bump 版本並 push:各助理都以 git 內容/版本判斷更新,請把 .claude-plugin/plugin.json.codex-plugin/plugin.jsonplugin.json 三個 manifest 的 version 一起 bump(規則見 skills/spec-plugin-version/),commit 後 push 到 gitea。
  6. 讓各助理更新:
    • Claudeclaude plugin update jsc-shared@shared
    • Codexcodex plugin marketplace upgrade shared
    • Antigravity:重新從 Gitea 遠端抓取到暫存目錄後再 agy plugin uninstall jsc-shared && agy plugin install <temp-dir>/shared
    • OpenCode:重新從 Gitea 遠端抓取到暫存目錄後再複製 skills/
    • Copilotcopilot plugin marketplace update shared && copilot plugin update jsc-shared@shared

本 repo 只放純 SKILL.md 內容,不含可執行腳本或 hook。

S
Description
Shared 指令 for AI 助理
https://gitea.jsc.idv.tw/plugins/shared
Readme
2.4 MiB
Languages
Markdown 100%