Back to Skills

migrate-to-codex

Migrate supported instruction files, skills, agents, and MCP config into Codex project and global files.

24,987stars1,697forksUpdated 8/16/2026

Security Assessment

Low Risk(88/100)

Detected risks:

Autonomous file writes and deletes(Once a migration target is selected the skill creates, edits, replaces, and deletes files without pausing for user confirmation., It can delete orphaned generated skills and agents via a replace flag, so misidentified files could be removed unexpectedly., The behavior is scoped to generated Codex artifacts in the chosen target and it is explicitly instructed not to touch source Claude Code files, secrets, or unrelated repositories, which limits the blast radius.)
Security Score88/100

About migrate-to-codex

migrate-to-codex is a migration tool that converts supported Claude Code configuration — instruction files, slash commands/skills, subagents, hooks, and MCP server config — into the equivalent Codex project and global files (AGENTS.md, .codex/, .agents/, ~/.codex/). It solves the problem of moving a working Claude Code setup onto Codex without hand-porting each surface, and it maps sources to targets explicitly (for example .claude/agents to .codex/agents, .mcp.json to .codex/config.toml MCP servers, .claude/settings.json hooks to .codex/hooks.json).

The skill drives a Python migrator with inspection-first flags — `--scan-only`, `--plan`, `--doctor`, and `--dry-run` — before writing anything, then converts surfaces in a fixed order and validates the generated config and agents with `--validate-target`. It reads a `references/differences.md` guide to account for Claude-vs-Codex behavior gaps, reports plugins and marketplaces as manual-review work, and produces a final markdown migration report per scope. It is designed to run autonomously once a target is selected: it will create, edit, replace, or delete generated Codex artifacts in that target without pausing for confirmation, using `--replace` to remove orphaned generated skills or agents. Importantly, it is constrained to only touch generated Codex files and explicitly must not edit source Claude Code files, unrelated project code, secrets, or other repositories, and it preserves unrelated existing Codex config entries.

It targets developers moving from Claude Code to Codex. The main thing to be aware of is its autonomous file writing and deletion within the chosen target directories, which is scoped to migration-generated artifacts rather than arbitrary files.

FAQ

What does it migrate?

Instruction files (CLAUDE.md/AGENTS.md), slash commands and skills, subagents, hooks, and MCP server configuration, into Codex targets like AGENTS.md, .agents/skills/, .codex/config.toml, .codex/hooks.json, and .codex/agents/.

Will it change my Claude Code configuration?

No. It must not edit source Claude Code files (.claude/, ~/.claude/, .mcp.json, .claude.json), unrelated project code, secrets, or other repositories; it only writes generated Codex artifacts.

Does it ask before writing or deleting files?

Once you select a target it runs autonomously, creating, editing, replacing, or deleting generated Codex artifacts in that target without confirmation. Deletion of orphaned generated skills/agents happens via --replace.

How can I preview the migration first?

Use the inspection flags --scan-only, --plan, and --doctor, and --dry-run, before writing a target, then --validate-target after edits.

Are plugins migrated automatically?

No. Claude plugin trees and marketplaces are reported as manual migration work rather than converted automatically.

All Files

19 files
LICENSE.txt11.1 KB
View
scripts/migrate-to-codex.py0.2 KB
View
scripts/migrate/codex_config.py3.9 KB
View
scripts/migrate/instructions.py2.4 KB
View
scripts/migrate/settings.py1.0 KB
View
scripts/utils/scan.py4.3 KB
View
references/differences.md13.4 KB
View
scripts/migrate/__init__.py0.3 KB
View
scripts/migrate/common.py11.2 KB
View
scripts/migrate/mcps.py6.9 KB
View
scripts/migrate/skills.py12.3 KB
View
scripts/utils/util.py9.2 KB
View
SKILL.md7.7 KB
View
agents/openai.yaml0.1 KB
View
scripts/cli.py29.4 KB
View
scripts/migrate/agents.py9.8 KB
View
scripts/migrate/hooks.py8.0 KB
View
scripts/migrate/plugins.py0.6 KB
View
scripts/utils/__init__.py0.0 KB
View

Install migrate-to-codex

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

openai/skills