构建插件
要构建或提交插件,请参阅 developers.openai.com 上的完整构建器文档。
本页面提供简要介绍。插件是一种可安装的软件包,可以包含技能、MCP 服务器,或两者兼有。MCP 服务器还可以返回可选的 UI。
ChatGPT 和 Codex 共享一个统一的插件目录。发布一次公共插件后,同一插件列表即可在两款产品支持的界面中被发现。在开发期间,可以使用本地市场,在将软件包提交到统一目录之前进行测试。
如果你仍在迭代某个个人工作流,请从技能开始。当你希望共享该工作流、打包相关技能、连接外部服务,或将稳定的功能分发给团队时,请构建插件。
使用 @plugin-creator 创建插件
Section titled “使用 @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 清单,整理插件文件夹,并可以将插件添加到本地市场。

完成后:
- 检查
.codex-plugin/plugin.json。 - 检查
skills/下的每项打包技能。 - 刷新 ChatGPT 或 Codex,然后从本地市场源安装插件。
- 在新对话中使用具有代表性的请求测试插件。
如果插件包含 MCP 服务器,请先构建并测试该服务器,然后将已注册的连接详细信息提供给 @plugin-creator。有关工具、身份验证、部署和测试,请遵循完整的 MCP 服务器工作流。
手动创建仅包含技能的插件
Section titled “手动创建仅包含技能的插件”最小插件包含一个清单和至少一项技能:
meeting-follow-up/├── .codex-plugin/│ └── plugin.json└── skills/ └── meeting-follow-up/ └── SKILL.md创建 .codex-plugin/plugin.json:
{ "name": "meeting-follow-up", "version": "1.0.0", "description": "Turn meeting notes into decisions and next steps", "skills": "./skills/"}然后添加 skills/meeting-follow-up/SKILL.md:
---name: meeting-follow-updescription: Extract decisions, owners, and next steps from meeting notes.---
Review the meeting notes. Return:
1. Decisions2. Action items with owners3. Open questions使用稳定的 kebab case 插件名称。技能描述应足够具体,以便 ChatGPT 和 Codex 识别何时适用该工作流。
使用 @plugin-creator 将文件夹添加到本地市场,然后在分享插件之前安装并测试插件。
继续阅读构建器文档
Section titled “继续阅读构建器文档”如需完整的构建器文档,请参阅插件文档。其中涵盖:
如需浏览、安装、启用或移除插件,请参阅使用插件。