一键导入
cc-to-codex
One-shot conversion of a Claude Code plugin to Codex format. Use when asked to convert, port, or add Codex support for a plugin in this repository.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
One-shot conversion of a Claude Code plugin to Codex format. Use when asked to convert, port, or add Codex support for a plugin in this repository.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
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.
Continuous maintenance workflow for plugins that target both Claude Code and Codex. Use when a plugin's commands, skills, or agents have changed and the Codex target needs updating.
Manually sync the editor theme to the current macOS appearance (light/dark). Use when the user switched macOS appearance and wants Claude Code and/or Codex themes refreshed now, or asks to fix/resync the theme. Light → gruvbox-light, dark → sunset-drive.
Install the plugin-cross-port pre-commit hook into any git repository. Use when the user invokes /install-hook.
Generates platform-specific social media descriptions for video clips. Creates copy for YouTube Shorts, Instagram Reels, and TikTok.
Analyzes video frames to determine optimal crop position for vertical (9:16) clips. Uses vision to locate the speaker and calculate crop coordinates.
| name | cc-to-codex |
| description | One-shot conversion of a Claude Code plugin to Codex format. Use when asked to convert, port, or add Codex support for a plugin in this repository. |
| version | 0.1.0 |
Convert a single plugin from Claude Code format to Codex-compatible format.
plugins/obsidian-tracker or just a plugin nameplugins/obsidian-tracker.claude-plugin/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>/.claude-plugin/plugin.json — required<plugin-path>/.mcp.json — optional<plugin-path>/skills/ directory listing — optional<plugin-path>/commands/ directory listing — optional<plugin-path>/agents/ directory listing — optional<plugin-path>/README.md — optionalIf .claude-plugin/plugin.json is missing, stop and report: "Not a Claude Code plugin: no .claude-plugin/plugin.json found."
If <plugin-path>/.codex-plugin/plugin.json already exists, read it and note what's already generated. Ask the user:
"
.codex-plugin/plugin.jsonalready exists. Overwrite or merge?"
.codex-plugin/plugin.jsonBuild the Codex manifest from the source Claude manifest:
{
"name": "<same as CC name>",
"version": "<same version>",
"description": "<same description>",
"author": {
"name": "<author.name from CC>"
},
"skills": "./skills/",
"interface": {
"displayName": "<Title Case of plugin name>",
"shortDescription": "<first sentence of description, max 80 chars>",
"developerName": "<author.name>",
"category": "Development",
"capabilities": ["Read", "Write"]
}
}
Rules:
hooks — Codex validator rejects itcommands array — Codex uses skills onlyagents array — not supported in Codex manifestskills points to ./skills/ (the shared directory at plugin root)skills/If the plugin has an existing skills/ directory, it is shared between Claude Code and Codex. No action needed — just confirm it exists.
commands/ to Codex skillsFor each .md file in <plugin-path>/commands/:
description, argument-hint)<plugin-path>/skills/generated-from-commands/<command-name>/SKILL.md:---
name: <plugin-name>-<command-name>
description: <description from command frontmatter, or "Command: <command-name>" if absent>. Use when the user invokes /<command-name>.
version: 0.1.0
---
> Converted from Claude Code command `/<command-name>`.
> Review and adapt: remove CC-specific allowed-tools frontmatter, MCP tool references that may not exist in Codex.
<original command body — everything after frontmatter>
Skip files already in skills/generated-from-commands/ if they are newer than the source command (idempotent).
agents/ to Codex skillsCodex has no separate agents concept, so each agent becomes a standalone skill.
For each .md file in <plugin-path>/agents/:
name, description)<example> trigger blocks into a
quoted single-line description with literal \n escapes. Keep only the text
before Examples: and unescape it.<plugin-path>/skills/generated-from-agents/<agent-name>/SKILL.md:---
name: <plugin-name>-<agent-name>
description: <cleaned description, already trigger-shaped>
version: 0.1.0
---
> Converted from Claude Code agent `<agent-name>`.
> Codex has no separate agents concept; this runs as a standalone skill.
<original agent system prompt — everything after frontmatter, ${CLAUDE_PLUGIN_ROOT} rewritten>
Skip files already in skills/generated-from-agents/ if they are newer than the source agent (idempotent).
Orchestration is not rewritten. A command that spawned these agents via the Task tool keeps referencing them by name — they now resolve as skills. Inlining a full multi-agent workflow into one skill is per-plugin manual work.
For hooks in plugin.json:
SessionStart, PostToolUse, etc.) have no Codex equivalent. Review and implement as skill side-effects or GitHub Actions if needed..plugin-cross-port.jsonWrite <plugin-path>/.plugin-cross-port.json:
Write it as JSON (the loader reads it back JSON-first; nested YAML breaks re-runs):
{
"version": 1,
"plugin": "<plugin-name>",
"generated_at": "<ISO date>",
"source_of_truth": "claude-code",
"decisions": {
"skills_shared": true,
"commands_converted": true,
"agents_converted": true,
"hooks_converted": false
},
"warnings": [],
"manually_maintained": []
}
For standalone one-shot conversion, the legacy converter may update the Codex marketplace. In a managed repository, prefer:
python3 plugins/plugin-cross-port/scripts/cross_port.py \
plugin convert <plugin-path> --from claude-code --to codex
python3 plugins/plugin-cross-port/scripts/cross_port.py \
plugin attach <plugin-path> --source claude-code
Read .agents/plugins/marketplace.json (create if absent).
Add or update entry for this plugin:
{
"name": "<plugin-name>",
"source": {
"source": "local",
"path": "./plugins/<plugin-name>"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "Development"
}
Avoid duplicates — check if an entry with the same name already exists.
Print a summary block:
Plugin Cross-Port: <plugin-name>
================================
Generated:
✅ .codex-plugin/plugin.json
✅ skills/generated-from-commands/<N> skills
✅ skills/generated-from-agents/<N> skills
✅ .plugin-cross-port.json
✅ .agents/plugins/marketplace.json updated
Shared (no action):
📁 skills/ — <N existing skills>
Warnings:
⚠️ hooks — no Codex equivalent
Manual steps:
1. Review generated skills in skills/generated-from-commands/
Remove CC-specific allowed-tools lines and MCP tool references that differ in Codex.
2. Review skills/generated-from-agents/ — agents run as standalone skills;
any command that orchestrated them references them by name.
3. Run: python3 plugins/plugin-cross-port/scripts/convert_cc_to_codex.py <plugin-path> --repo-root .
to validate idempotency.
.claude-plugin/plugin.json → stop with clear error.codex-plugin/ dir doesn't exist → create it.agents/plugins/marketplace.json doesn't exist → create it with empty plugins: []