Codex/Plugin
Build plugins – Codex
- Author-facing guide; for installing and using plugins in Codex, see Plugins.
- Build plugins | ChatGPT Learn
A plugin is an installable package that can include skills, an MCP server, or both. An MCP server can also return optional UI.
ChatGPT and Codex share one universal plugin directory. Publish a public plugin once to make the same listing discoverable from supported surfaces in both products. During development, use a local marketplace to test the package before submitting it to the universal directory.
- Prefer a local Codex/Skill while iterating on one repo or one personal workflow; build a plugin to share across teams, bundle app integrations or MCP config, package lifecycle hooks, or publish a stable package.
Scaffold with
@plugin-creatorMarketplaces
- JSON catalog of plugins; one marketplace can start as a single-plugin test list and grow into a curated catalog.
- Repo-scoped:
$REPO_ROOT/.agents/plugins/marketplace.jsonwith plugins often under$REPO_ROOT/plugins/. - Personal:
~/.agents/plugins/marketplace.jsonwith plugins often under~/.codex/plugins/. - Each
plugins[]entry:source.pathis./-prefixed relative to the marketplace root (not relative to.agents/plugins/);interface.displayNameis the picker label; includepolicy.installation,policy.authentication, andcategoryon each entry. - Restart Codex after marketplace changes.
CLI
codex plugin marketplace add owner/repo codex plugin marketplace add owner/repo --ref main codex plugin marketplace add https://github.com/example/plugins.git --sparse .agents/plugins codex plugin marketplace add ./local-marketplace-rootcodex plugin marketplace list— configured marketplaces and resolved roots.codex plugin marketplace upgrade/remove marketplace-name.- Git sources:
owner/repo,owner/repo@ref, HTTP/HTTPS/SSH URLs;--sparse PATH(repeatable) for sparse checkout;--refpins a ref.
- Codex also reads legacy
$REPO_ROOT/.claude-plugin/marketplace.json. - Installs land in
~/.codex/plugins/cache/$MARKETPLACE_NAME/$PLUGIN_NAME/$VERSION/(localfor local plugins); per-plugin on/off in~/.codex/config.toml.
Repo activation
.agents/plugins/marketplace.jsonexposes a repo catalog. A trusted project.codex/config.tomlcan set[plugins."my-plugin@local-repo"]withenabled = true; supported local clients can install or refresh configured plugins during marketplace refresh. Repo plugin configuration.- Source edits still pass through the installation cache. See Codex/Plugin/Q/Does registering a local plugin copy it into a home-directory cache?.
Portable plugin package
- Current portable packages use root
plugin.jsonwith the Agent Plugins 1.0 schema,skills/, and optional rootmcp.json. OpenAI settings live underextensions.com.openai. The.codex-plugin/plugin.jsonlayout remains a compatibility fallback. Package format. - ChatGPT/Plugin/How To/Develop and Share a Team Plugin for ChatGPT and Claude
- Current portable packages use root
Codex compatibility plugin (manual)
- Manifest at
.codex-plugin/plugin.jsononly inside.codex-plugin/;skills/,hooks/,assets/,.mcp.json,.app.jsonat plugin root. { "name": "my-first-plugin", "version": "1.0.0", "description": "Reusable greeting workflow", "skills": "./skills/" }- Stable kebab-case
name— plugin identifier and component namespace. - Skill at
skills/<name>/SKILL.mdwith YAML frontmatter (name,description) and body instructions. - Wire into a marketplace (via
@plugin-creatoror manualmarketplace.json), restart Codex.
- Manifest at
Workspace sharing (Codex app)
Codex compatibility manifest
- Top-level:
name,version,description,author,homepage,repository,license,keywords,skills,mcpServers,apps,hooks. interface:displayName,shortDescription,longDescription,developerName,category,capabilities, legal URLs,defaultPrompt,brandColor,composerIcon,logo,screenshots.- Paths relative to plugin root, start with
./; assets under./assets/when possible. - Default hooks file
hooks/hooks.jsonis auto-discovered; manifesthookscan override (path, array of paths, or inline objects). - Hook commands get
PLUGIN_ROOT,PLUGIN_DATA(andCLAUDE_PLUGIN_*for compatibility); plugin hooks are non-managed until user trusts them (Hooks).
- Top-level:
Bundled MCP
Git-backed marketplace entries
- Official Plugin Directory self-serve publishing: coming soon.
Related
- Every/GitHub/compound-engineering-plugin — example marketplace plugin (
codex plugin marketplace add EveryInc/compound-engineering-plugin); see Engineer/ing/Compound.
- Every/GitHub/compound-engineering-plugin — example marketplace plugin (