建置外掛
建置外掛
為 ChatGPT 和 Codex 建立並測試可複用的功能
要建置或提交外掛,請參閱 developers.openai.com 上的完整建置器文件。
本頁提供簡要介紹。外掛是一種可安裝的軟體包, 其中可以包含技能、MCP server,或兩者兼有。MCP server還可以傳回 可選 UI。
ChatGPT 和 Codex 共用一個通用外掛目錄。只需發布一次公共外掛, 即可讓同一條目在兩款產品所支援的介面中都可被發現。在開發期間,請先使用本機市場測試軟體包, 再將其提交到通用目錄。
有關通過 GitHub 在工作區中分發外掛的資訊,請參閱 外掛管理。
如果你仍在迭代某個個人工作流程,請從技能開始。 如果你想共享該工作流程、打包相關技能、 連線外部服務,或向團隊分發穩定的能力,請建置外掛。
使用 @plugin-creator 建立外掛
若要以最快的方式完成設定,請在 ChatGPT Work
模式中使用內建的 @plugin-creator 技能,或在 Codex 中使用 $plugin-creator。
@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 格式
有所不同。有關可選檔案和目錄,請參閱腳手架佈局
。
- 檢查
.codex-plugin/plugin.json。 - 根據
指令遵循指南檢查
skills/下捆綁的每個技能。 - 重新整理 ChatGPT 或 Codex,然後從其本機市場 來源安裝外掛。
- 在新對話中使用有代表性的請求測試外掛。
如果外掛包含 MCP server,請先建置並測試該伺服器,然後
向 @plugin-creator 提供已註冊的連線詳細資訊。有關工具、身份驗證、部署和測試,請遵循完整的
MCP server工作流程。
手動建立僅含技能的外掛
一個最小的可移植 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使用穩定的 kebab case 外掛名稱。技能描述應足夠具體, 以便 ChatGPT 和 Codex 能夠識別該工作流程的適用場景。
使用 @plugin-creator 將資料夾新增到本機市場,然後先安裝並
測試,再進行共享。
繼續閱讀建置器文件
有關完整的建置器文件,請參閱 外掛文件。其中涵蓋:
若要瀏覽、安裝、啟用或移除外掛,請參閱使用 外掛。