/claude-to-codex-migrator:claude-to-codex-migratorfrom claude-to-codex-migrator
Migrate Claude skills, plugins, assistant packages, ZIP archives, pasted files, repository trees, or implementation documentation into clean Codex Skills or plugins. Use when Codex must inventory a source package, choose Skill versus plugin architecture, preserve behavior, rewrite platform-specific instructions, validate MCP or hooks, remove Claude branding from the distributable output, and produce migration and cleanup reports.
Ships in claude-to-codex-migrator. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Migrate source packages through a clean-room, report-backed workflow. Use the bundled scripts for deterministic staging, inventory, transformation, cleanup scanning, and validation. Apply judgment only where the reports identify semantic or unsupported work.
Resolve <skill-root> to the directory containing this SKILL.md. Invoke every bundled script by its path under <skill-root>/scripts; do not assume the user's current working directory is the installed Skill directory.
keep-as-is, rename, rewrite, split-into-reference, delete, or manual.Accept a folder, ZIP, single file, or stdin bundle directly. For pasted multi-file content, repository trees, or documentation-only descriptions, materialize a JSON stdin bundle before migration.
When the user names an installed source package but does not provide its path, discover or resolve it first:
python3 <skill-root>/scripts/discover_installed.py
python3 <skill-root>/scripts/discover_installed.py --resolve <plugin-id>
Read input-contract.md when the input is not a normal source folder.
Inventory without writing output:
python3 <skill-root>/scripts/inventory_source.py <source>
For stdin, pass either plain text or a JSON object whose files field maps relative paths to string contents.
Review the inventory for hidden files, runtime dependencies, source-specific references, unknown components, and warnings. Read component-mapping.md when commands, agents, hooks, MCP, apps, settings, LSP, or unknown files exist.
Use automatic architecture selection unless the user explicitly requires a target:
python3 <skill-root>/scripts/migrate.py <source> --out <output> --strict
Use --target skill or --target plugin only when the user or verified target architecture requires it. Use --name <name> to override the normalized package name. Use --force only when replacing the chosen output is intentional.
Hooks, MCP, and app configuration are quarantined as manual items by default and preserved under reports/unresolved/. Review every hook command and MCP executable there, then re-run with --trust-runtime to place them at their active discovery paths. Never pass --trust-runtime on the first run of an unreviewed source.
Inspect these files after every run:
reports/decision.mdreports/migration-plan.jsonreports/migration-report.mdreports/cleanup-report.jsonreports/validation-report.mdreports/unresolved/ when presentRead transformation-rules.md before resolving manual items or editing generated instructions. Preserve the full instruction body of source agents and commands. Do not copy source model identifiers blindly. Verify hook events, matcher behavior, local executable paths, environment variables, and MCP dependencies.
If strict mode exits with code 2, keep the generated reports, resolve only the identified issues, and rerun or validate the corrected package. Do not report completion while manual items or validation failures remain unless the user asked for a plan-only migration.
Run the target-aware validator after any manual edit:
python3 <skill-root>/scripts/validate_output.py <output>/package/<name> --target auto
Run the cleanup scanner independently:
python3 <skill-root>/scripts/scan_leftovers.py <output>/package/<name>
For generated plugins, also run the current plugin-creator validator when available. For generated Skills, run the current skill-creator validator when available. Read validation-checklist.md before handoff.
Return, in order:
build as Skill or build as pluginRead report-schema.md when another tool will consume the JSON reports.
Folder or ZIP:
python3 <skill-root>/scripts/migrate.py ./source-package --out ./migration-output --strict
python3 <skill-root>/scripts/migrate.py ./source-package.zip --out ./migration-output --strict
Plain pasted documentation:
printf '%s' '<pasted content>' | python3 <skill-root>/scripts/migrate.py - --stdin-name SOURCE.md --out ./migration-output --strict
Multi-file bundle:
{
"files": {
".claude-plugin/plugin.json": "{\"name\":\"example\",\"version\":\"1.0.0\"}",
"commands/review.md": "# Review\n\nReview the current change."
}
}
--force is explicit, and only when every file is listed in the output's ownership manifest.--trust-runtime is passed after review.reports/unresolved/, never inside the package.agents/openai.yaml (opens in a new tab)references/component-mapping.md (opens in a new tab)references/input-contract.md (opens in a new tab)references/report-schema.md (opens in a new tab)references/transformation-rules.md (opens in a new tab)references/validation-checklist.md (opens in a new tab)scripts/discover_installed.py (opens in a new tab)scripts/inventory_source.py (opens in a new tab)scripts/migrate.py (opens in a new tab)scripts/migrate_to_codex/__init__.py (opens in a new tab)scripts/migrate_to_codex/common.py (opens in a new tab)scripts/migrate_to_codex/discovery.py (opens in a new tab)scripts/migrate_to_codex/engine.py (opens in a new tab)scripts/migrate_to_codex/models.py (opens in a new tab)scripts/migrate_to_codex/planner.py (opens in a new tab)scripts/migrate_to_codex/reporting.py (opens in a new tab)scripts/migrate_to_codex/source.py (opens in a new tab)scripts/migrate_to_codex/transform.py (opens in a new tab)scripts/migrate_to_codex/validation.py (opens in a new tab)scripts/scan_leftovers.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub ahmedawan-oracle/claude-code-plugins --plugin claude-to-codex-migrator