feat: add Codex plugin support without duplicating skills#88
feat: add Codex plugin support without duplicating skills#88federicobartoli wants to merge 4 commits intoaddyosmani:mainfrom
Conversation
Register the repo as a Codex plugin so `codex marketplace add addyosmani/agent-skills` installs it in a single step. The plugin reads the existing `skills/` directory via a symlink — no files are copied, and `skills/<name>/SKILL.md` remains the single source of truth shared with Claude Code. - codex/.codex-plugin/plugin.json — Codex manifest, skills: "./skills/" - codex/skills → ../skills — symlink so the plugin dir stays self-contained while git tracks a single canonical skills/ at the repo root - .agents/plugins/marketplace.json — local marketplace entry, plugin at ./codex - docs/codex-setup.md — install and usage guide Verified end-to-end with codex-cli 0.121.0: skills appear in the plugin's Skills list after install.
|
why not to have claude commands like "spec", "plan", "build", "test", "review", "ship" inside codex? |
|
support to add skill in codex more smoothly. I personally want to use it. |
| ## Install (one command) | ||
|
|
||
| ```bash | ||
| codex marketplace add addyosmani/agent-skills |
There was a problem hiding this comment.
nit: I think also need to update readme for QuickStart?
There was a problem hiding this comment.
yes, thank u man, i'll make the change as soon as I can :D
e62f2d3 to
a66ba51
Compare
a66ba51 to
995b819
Compare
In Codex CLI 0.122 the marketplace subcommand moved from `codex marketplace` to `codex plugin marketplace`. Update README and docs/codex-setup.md so install snippets work on current Codex (verified on 0.128.0). Keep one historical reference in the v0.122 callout.
|
Pushed In Codex CLI 0.122 the marketplace subcommand moved from Test plan still valid; just substitute the new subcommand: codex plugin marketplace add federicobartoli/agent-skills@feat/codex-plugin-support |
Summary
Make this repo installable as a Codex plugin with a single command, while keeping
skills/as the single source of truth shared with Claude Code. No files are copied, no installer script, no wrapper skills.What this adds
codex/.codex-plugin/plugin.json— Codex manifest ("skills": "./skills/").codex/skills— git-tracked symlink to../skills(9 bytes, mode120000). Keeps the plugin directory self-contained without duplicating any skill content..agents/plugins/marketplace.json— marketplace entry declaring the plugin at./codex.docs/codex-setup.md— install and usage guide, including a fallback that replaces the symlink with a local copy for Windows users.Net change: 4 files, ~78 lines, 0 duplicated skill content.
Why no duplication
Codex and Claude Code share the same
SKILL.mdformat (YAML frontmatter withname+description). The Codex plugin docs defineskillsas a relative path to a folder; pointing it at the existingskills/via a symlink means one file serves both platforms..claude/commands/andagents/stay Claude-specific — Codex natively supports only skills, apps, and MCP servers, so bundling commands/personas inside a Codex plugin isn't meaningful. Codex users invoke skills directly.Why a
codex/subdirectoryCodex's manifest validator rejects plugins at the marketplace root:
source.pathmust start with./and stay inside the marketplace root.codex/is that subdirectory.Verified
Tested with
codex-cli 0.121.0:codex marketplace add federicobartoli/agent-skills@feat/codex-plugin-supportsucceeds.~/.codex/config.toml, cached under~/.codex/plugins/cache/agent-skills/.Open to alternatives
If a symlink in the repo is undesirable, I'm happy to switch to either:
git mv skills codex/skillsand point Claude Code's plugin.json at the new path (no symlink, but larger diff moving 21 directories), orcp -R skills codex/skillsstep aftergit clone(no symlink, but install is no longer a singlecodex marketplace add).Just let me know which direction you prefer.
Relation to #82
Lighter-weight alternative to #82 (which adds ~900 lines: installer script, wrapper skills regenerated from
.claude/commands/, bundled copies ofskills//references//agents/). Same intent; here Codex reads the existingskills/directly. Happy to defer to whichever direction the maintainer prefers.Test plan
codex marketplace add federicobartoli/agent-skills@feat/codex-plugin-supportsucceeds~/.codex/config.toml~/.codex/plugins/cache/agent-skills/Next ideas: consider auto-generating (?) or at least avoiding repetition of the manifest; also consider enriching the manifest with marketplace metadata (https://developers.openai.com/codex/plugins/build#marketplace-metadata
).