feat: add Cursor marketplace and plugin support#25
Draft
mmizutani wants to merge 1 commit intoopenai:mainfrom
Draft
feat: add Cursor marketplace and plugin support#25mmizutani wants to merge 1 commit intoopenai:mainfrom
mmizutani wants to merge 1 commit intoopenai:mainfrom
Conversation
Add .cursor-plugin manifests alongside the existing .claude-plugin ones
so the Codex plugin is discoverable from both the Claude Code and Cursor
marketplaces.
- .cursor-plugin/marketplace.json — root marketplace for Cursor
- plugins/codex/.cursor-plugin/plugin.json — plugin manifest validated
against cursor.com/docs/reference/plugins (no non-spec fields)
- plugins/codex/hooks/cursor-hooks.json — Cursor-format hooks (version 1,
camelCase events, timeout values, ${CURSOR_PLUGIN_ROOT} interpolation)
- plugins/codex/scripts/cursor-session-lifecycle-hook.mjs — Cursor
sessionStart adapter that outputs { "env": { ... } } JSON instead of
writing to CLAUDE_ENV_FILE
- README.md — updated title, description, and install section for Cursor
Author
|
It seems Cursor Plugins skip support for Commands in favor of Skills. Fixing ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
.cursor-plugin/manifests alongside the existing.claude-plugin/ones so the Codex plugin is discoverable from both the Claude Code and Cursor marketplaces.What's included
.cursor-plugin/marketplace.json— root marketplace manifest for Cursor (usespluginRootconvention, plugin-level metadata withcategory/tags/keywords)plugins/codex/.cursor-plugin/plugin.json— plugin manifest validated against cursor.com/docs/reference/plugins (only spec-valid fields;category/tagslive in marketplace entry, not here)plugins/codex/hooks/cursor-hooks.json— Cursor-format hooks (version: 1, camelCase event names,timeoutvalues,${CURSOR_PLUGIN_ROOT}interpolation)plugins/codex/scripts/cursor-session-lifecycle-hook.mjs— CursorsessionStartadapter that outputs{ "env": { ... } }JSON (Cursor's mechanism) instead of writing toCLAUDE_ENV_FILE(Claude Code's mechanism)README.md— updated title, description, and install section with Cursor instructionsDesign decisions
cursor-hooks.jsonreferenced via explicit"hooks"field in plugin.json; existinghooks.json(Claude Code format) untouchedCURSOR_PLUGIN_ROOTvsCLAUDE_PLUGIN_ROOTCLAUDE_PLUGIN_ROOT="${CURSOR_PLUGIN_ROOT}"so existing scripts resolve paths correctlyCLAUDE_ENV_FILEnot available in Cursorcursor-session-lifecycle-hook.mjsoutputs{ "env": { ... } }on stdout per Cursor hook output specCLAUDE_PLUGIN_DATAnot available in Cursorlib/state.mjsalready falls back to$TMPDIR/codex-companion— no change neededLimitations
sessionEndandstophooks reuse the original scripts. They work but lackCLAUDE_ENV_FILEandCLAUDE_PLUGIN_DATA, so session-scoped env var propagation relies on Cursor'ssessionStart→envoutput mechanism and the tmpdir state fallback.allowed-tools,disable-model-invocation). Cursor tolerates unknown frontmatter fields, but these features won't activate in Cursor.Cursor Marketplace/Plugins References
Test plan
/add-plugin openai/codex-plugin-cc) and verify it appears in installed plugins/codex:setup,/codex:review, and other slash commands are discoverable in CursorsessionStarthook fires and propagatesCODEX_COMPANION_SESSION_IDto subsequent hooks.claude-plugin/orhooks/hooks.json)Note
We might be able to interpret the *cc portion of the repo name as either "Claude Code" or "Claude Code and Cursor".