From plugin-cross-port
One-shot conversion of a Codex plugin to Claude Code format. Use when asked to convert a Codex plugin to Claude Code, add CC support for a Codex plugin, or reverse-port a plugin from Codex.
How this skill is triggered — by the user, by Claude, or both
Slash command
/plugin-cross-port:codex-to-ccThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Convert a single plugin from Codex format to Claude Code-compatible format.
Convert a single plugin from Codex format to Claude Code-compatible format.
plugins/my-codex-plugin.agents/plugins/marketplace.json (default: detect from cwd)When the plugin lives outside this repository, copy it into plugins_dir
before conversion. Review license and attribution, resolve name collisions,
discard stale foreign generated artifacts after review, and explicitly choose
the source of truth when attaching. Deterministic scripts never copy files
between repositories.
Read the following files from the target plugin (skip if absent):
<plugin-path>/.codex-plugin/plugin.json — required<plugin-path>/skills/ directory listing — list all SKILL.md files<plugin-path>/.mcp.json — optional<plugin-path>/README.md — optional<plugin-path>/.plugin-cross-port.yaml — optional (check source_of_truth)If .codex-plugin/plugin.json is missing, stop and report: "Not a Codex plugin: no .codex-plugin/plugin.json found."
If .plugin-cross-port.yaml exists with source_of_truth: claude-code, warn:
"This plugin was originally created in Claude Code. Reverse conversion may produce redundant files. Proceed?"
If <plugin-path>/.claude-plugin/plugin.json already exists, read it. Ask:
"
.claude-plugin/plugin.jsonalready exists. Overwrite or merge?"
.claude-plugin/plugin.jsonBuild the CC manifest from the Codex manifest:
{
"name": "<same as Codex name>",
"description": "<same description>",
"version": "<same version>",
"author": {
"name": "<author.name>",
"email": "",
"url": ""
},
"keywords": ["<interface.category>", "codex", "cross-platform"],
"license": "MIT",
"skills": [
"./skills/<name>/SKILL.md"
// list all SKILL.md files from skills/
]
}
Notes:
hooks — must be added manually based on plugin logicskills arraycommands array is only added if Step 5 produces generated commandsskills/skills/ is shared between Codex and CC. List all existing skills and confirm they load correctly in CC (SKILL.md format with frontmatter: name, description).
If a skill has no frontmatter or missing description, emit warning.
skills/ to CC commandsFor each skills/<name>/SKILL.md (exclude generated-from-commands/):
name, descriptioninterface.capabilities → allowed-tools:
Read → Read, Glob, GrepWrite → Write, EditExecute → BashNetwork → WebFetch, WebSearch<plugin-path>/commands/generated-from-codex-<skill-name>.md:---
description: <description from SKILL.md, without "Use when the user invokes /X." suffix>
argument-hint: "[args]"
allowed-tools: [<mapped tools>]
---
> Converted from Codex skill `<skill-name>`.
> Review and adapt: add specific `allowed-tools` entries and `${CLAUDE_PLUGIN_ROOT}` paths as needed.
<SKILL.md body>
If skill body starts with > Converted from Claude Code command (round-trip case), strip that header.
Skip generated commands if newer than source skill (idempotent).
CC supports hooks (SessionStart, PostToolUse, PreCompact, Stop, etc.). Codex has no equivalent.
Emit notice:
"Hooks are not auto-generated. If this plugin needs event-driven behavior (session tracking, auto-commit, etc.), add hooks manually to
.claude-plugin/plugin.json."
If --strict and .plugin-cross-port.yaml doesn't have decisions.hooks_converted: true, fail with this message.
.plugin-cross-port.yamlversion: 1
plugin: <plugin-name>
generated_at: <ISO date>
source_of_truth: codex
decisions:
skills_shared: true
skills_converted_to_commands: true
hooks_converted: false # must be set manually after adding hooks
warnings: []
manually_maintained: []
For standalone one-shot conversion, use:
python3 plugins/plugin-cross-port/scripts/cross_port.py \
plugin convert <plugin-path> --from codex --to claude-code
For a managed repository, attach the plugin after conversion:
python3 plugins/plugin-cross-port/scripts/cross_port.py \
plugin attach <plugin-path> --source codex
Plugin Cross-Port (Codex → CC): <plugin-name>
=============================================
Generated:
✅ .claude-plugin/plugin.json
✅ commands/generated-from-codex-<N> commands
✅ .plugin-cross-port.yaml
Shared (no action):
skills/ — <N skills>
Notices:
ℹ️ hooks — not generated, add manually if needed
Manual steps:
1. Review commands/generated-from-codex-*.md — refine allowed-tools.
2. Add hooks to .claude-plugin/plugin.json if needed.
3. Rename/move generated commands to commands/<name>.md when satisfied.
4. Run: python3 scripts/convert_codex_to_cc.py <plugin-path> --repo-root .
to validate idempotency.
.codex-plugin/plugin.json → stop with clear errorskills/ is empty → warn (or strict fail)interface.capabilities missing → default to ["Read", "Write"]Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub ivanlutsenko/awac-ai-agent-plugins --plugin plugin-cross-port