For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
主要導覽

建置外掛程式

為 ChatGPT 和 Codex 建立及測試可重複使用的能力

若要建置或提交外掛程式,請參閱 developers.openai.com 上的完整建置文件

本頁提供簡要介紹。外掛程式是可安裝的套件, 可包含技能、MCP 伺服器,或同時包含兩者。MCP 伺服器也可傳回 選用的使用者介面。

ChatGPT 和 Codex 共用同一個通用外掛程式目錄。公開外掛程式只需發布一次, 即可在兩項產品支援的介面中找到同一個上架項目。 開發期間,請先透過本機市集測試套件, 再將其提交至通用目錄。

若要透過 GitHub 在工作區中散布外掛程式,請參閱 外掛程式管理

若仍在反覆調整一項個人工作流程,請先從技能著手。 若要分享該工作流程、封裝相關技能、連線至外部服務, 或將穩定的能力提供給團隊,請建置外掛程式。

使用 @plugin-creator 建立外掛程式

最快的設定方式是使用 ChatGPT Work 模式內建的 @plugin-creator 技能, 或在 Codex 中使用 $plugin-creator

請描述預期成果、要包含的技能或 MCP 伺服器,以及是否需要 用於測試的本機市集項目。例如:

@plugin-creator Create a plugin named meeting-follow-up.
Include a skill that turns meeting notes into decisions, owners, and next steps.
Add it to a personal marketplace so I can test it locally.

此技能會建立受支援的 .codex-plugin/plugin.json 相容性資訊清單, 整理外掛程式資料夾,並可將外掛程式加入本機市集。 這套骨架與手動建立範例使用的可攜式根目錄 plugin.json 格式不同。 如需瞭解選用的檔案與目錄,請參閱骨架配置

完成後:

  1. 審查 .codex-plugin/plugin.json
  2. 檢查 skills/ 下隨附的每個技能。
  3. 重新整理 ChatGPT 或 Codex,並從外掛程式的本機市集 來源安裝外掛程式。
  4. 在新對話中使用具代表性的請求測試外掛程式。

若外掛程式包含 MCP 伺服器,請先建置並測試該伺服器, 再將已註冊的連線詳細資料提供給 @plugin-creator。請依照完整的 MCP 伺服器工作流程 處理工具、身分驗證、部署與測試。

手動建立僅含技能的外掛程式

最精簡的可攜式 Agent Plugins 套件包含一份位於根目錄的資訊清單, 以及至少一個技能:

meeting-follow-up/
├── plugin.json
└── skills/
    └── meeting-follow-up/
        └── SKILL.md

在外掛程式根目錄建立 plugin.json

{
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
  "name": "meeting-follow-up",
  "version": "1.0.0",
  "description": "Turn meeting notes into decisions and next steps"
}

可攜式套件會自動探索 skills/ 中的技能。新增 skills/meeting-follow-up/SKILL.md

---
name: meeting-follow-up
description: Extract decisions, owners, and next steps from meeting notes.
---

Review the meeting notes. Return:

1. Decisions
2. Action items with owners
3. Open questions

使用固定的外掛程式名稱,並採用以連字號分隔小寫單字的命名方式。技能描述應夠具體, 讓 ChatGPT 和 Codex 能辨識該工作流程適用的情境。

使用 @plugin-creator 將資料夾加入本機市集,接著安裝並 測試外掛程式,再進行分享。

繼續閱讀建置文件

如需完整的建置文件,請參閱 外掛程式文件。內容涵蓋:

若要瀏覽、安裝、啟用或移除外掛程式,請參閱使用 外掛程式