Convert Claude Code Plugin 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.
What this skill does
# Convert Claude Code Plugin → Codex
Convert a single plugin from Claude Code format to Codex-compatible format.
## When to activate
- User says "convert X to Codex", "port X to Codex", "add Codex support for X"
- User provides a path like `plugins/obsidian-tracker` or just a plugin name
## Inputs
- **Plugin path** — relative to repo root, e.g. `plugins/obsidian-tracker`
- **Repo root** — directory containing `.claude-plugin/marketplace.json` (default: detect from cwd)
## Workflow
## Phase 0: Vendor external plugins
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.
### Step 1 — Read source
Read the following files from the target plugin (skip if absent):
1. `<plugin-path>/.claude-plugin/plugin.json` — required
2. `<plugin-path>/.mcp.json` — optional
3. `<plugin-path>/skills/` directory listing — optional
4. `<plugin-path>/commands/` directory listing — optional
5. `<plugin-path>/agents/` directory listing — optional
6. `<plugin-path>/README.md` — optional
If `.claude-plugin/plugin.json` is missing, stop and report: "Not a Claude Code plugin: no .claude-plugin/plugin.json found."
### Step 2 — Check for existing Codex manifest
If `<plugin-path>/.codex-plugin/plugin.json` already exists, read it and note what's already generated. Ask the user:
> "`.codex-plugin/plugin.json` already exists. Overwrite or merge?"
### Step 3 — Generate `.codex-plugin/plugin.json`
Build the Codex manifest from the source Claude manifest:
```json
{
"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:
- Do NOT include `hooks` — Codex validator rejects it
- Do NOT include `commands` array — Codex uses skills only
- Do NOT include `agents` array — not supported in Codex manifest
- `skills` points to `./skills/` (the shared directory at plugin root)
### Step 4 — Copy/verify `skills/`
If the plugin has an existing `skills/` directory, it is shared between Claude Code and Codex. No action needed — just confirm it exists.
### Step 5 — Convert `commands/` to Codex skills
For each `.md` file in `<plugin-path>/commands/`:
1. Read the file and extract frontmatter (`description`, `argument-hint`)
2. Create directory: `<plugin-path>/skills/generated-from-commands/<command-name>/`
3. Write `SKILL.md`:
```markdown
---
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).
### Step 6 — Report agents/ and hooks warnings
For each `.md` file in `<plugin-path>/agents/`:
- **WARNING**: `agents/<filename>` — agents are not auto-converted. Add manually to Codex skills or `skills/generated-from-agents/` after review.
For hooks in `plugin.json`:
- **WARNING**: Hooks (`SessionStart`, `PostToolUse`, etc.) have no Codex equivalent. Review and implement as skill side-effects or GitHub Actions if needed.
### Step 7 — Create `.plugin-cross-port.yaml`
Write `<plugin-path>/.plugin-cross-port.yaml`:
```yaml
version: 1
plugin: <plugin-name>
generated_at: <ISO date>
source_of_truth: claude-code
decisions:
skills_shared: true # skills/ is shared between CC and Codex
commands_converted: true # commands/ -> skills/generated-from-commands/
agents_converted: false # requires manual review
hooks_converted: false # no Codex equivalent
warnings: [] # fill with actual warnings from steps 5-6
manually_maintained:
- .codex-plugin/plugin.json # mark as maintained if user customized it
```
### Step 8 — Update Codex marketplace
For standalone one-shot conversion, the legacy converter may update the Codex
marketplace. In a managed repository, prefer:
```bash
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:
```json
{
"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.
### Step 9 — Show summary
Print a summary block:
```
Plugin Cross-Port: <plugin-name>
================================
Generated:
✅ .codex-plugin/plugin.json
✅ skills/generated-from-commands/<N> skills
✅ .plugin-cross-port.yaml
✅ .agents/plugins/marketplace.json updated
Shared (no action):
📁 skills/ — <N existing skills>
Warnings:
⚠️ agents/<name> — manual conversion required
⚠️ 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. Optionally convert agents to skills manually.
3. Run: python3 plugins/plugin-cross-port/scripts/convert_cc_to_codex.py <plugin-path> --repo-root .
to validate idempotency.
```
## Error handling
- Missing `.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: []`
- Command file has no frontmatter → use filename as description, emit warning
Related in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product — visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".