migrate-to-codex

migrate-to-codex is a skill for Claude Code, Codex from Haohao-end/openagent. It costs 28 tokens per session (1,915 once invoked), scanned C, original, MIT.

A migration workflow for moving supported instruction files, skills, agents, and tool settings into Codex, the coding-agent environment. It runs the migration, checks the generated files, and fixes problems it finds.

In plain words
What is it for?
Use it to migrate project or global instructions, skills, agents, and MCP server configuration into Codex, then validate and correct the generated Codex files.
Why use it?
It reduces the risk of losing existing instructions or configuration when changing to Codex. It also preserves unrelated Codex settings and checks the migrated result again after repairs.

Skill for Claude CodeCodex

Written for Claude Code and Codex: PreToolUse hook event, but also agents/openai.yaml present. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is $MIGRATE_TO_CODEX --source ./.claude/ --target ./.codex/ --dry-run.

Good fit Use it to migrate project or global instructions, skills, agents, and MCP server configuration into Codex, then validate and correct the generated Codex files.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Haohao-end/openagent
agentmods
npx agentmods add skills/haohao-end/openagent/migrate-to-codex

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for migrate-to-codex

README.md
[![agentmods](https://agentmods.dev/badge/skills/haohao-end/openagent/migrate-to-codex.svg)](https://agentmods.dev/skills/haohao-end/openagent/migrate-to-codex)
Your own site
<a href="https://agentmods.dev/skills/haohao-end/openagent/migrate-to-codex"><img src="https://agentmods.dev/badge/skills/haohao-end/openagent/migrate-to-codex.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,915 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.01915
Opus 5 $0.00014 $0.00958
Sonnet 5 $0.00006 $0.00383
Haiku 4.5 $0.00003 $0.00192

Measured 8d ago against content hash 145b7fe48360, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade C, and why

migrate-to-codex scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 15 executable files (scripts/cli.py, scripts/migrate-to-codex.py, scripts/migrate/__init__.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Keep going until the selected migration is completely done: run the migrator, inspect the report, fix migrated Codex instructions/skills/agents/MCP config, and re-run checks without stopping to ask for confirmation of th

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

Keep going until the selected migration is completely done: run the migrator, inspect the report, fix migrated Codex instructions/skills/agents/MCP config, and re-run checks without stopping to ask for confirmation of th
api/internal/core/skills/catalog/migrate-to-codex/SKILL.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Migrate to Codex

Autonomy

Keep going until the selected migration is completely done: run the migrator, inspect the report, fix migrated Codex instructions/skills/agents/MCP config, and re-run checks without stopping to ask for confirmation of the next step. If the user has selected a target, do not ask before creating, editing, replacing, or deleting generated Codex artifacts in that target (AGENTS.md, .codex/, .agents/, or ~/.codex/). Preserve unrelated existing Codex config entries in .codex/config.toml or ~/.codex/config.toml, such as notify, projects, marketplaces, or unrelated MCP servers; do not ask about them unless they fail validation or directly conflict with the migration. Do not edit source Claude Code files (.claude/, ~/.claude/, .mcp.json, or .claude.json), unrelated project code, secrets, or another repository.

Migration Order

Run the migration in this order for each selected global or project source:

  1. Start by using Codex's built-in TODO/task list tool. Do not create MIGRATION_TODOS.md or any TODO file unless the user explicitly asks. The TODO list input has a plan array whose items each have step and status; use statuses pending, in_progress, and completed. Make the TODOs specific to the selected artifacts. Before finishing, update the TODO list so every finished step is marked completed and no step remains in_progress. Use literal source → Codex target labels, for example:

    • Inspect .claude/commands → Codex skills/prompts
    • Inspect .claude/agents.codex/agents
    • Inspect .mcp.json.codex/config.toml MCP servers
    • Inspect .claude/settings.json hooks → .codex/hooks.json
    • Migrate safe selected artifacts → Codex files
    • Validate generated .codex/config.toml
    • Validate generated .codex/agents
    • Report migrated artifacts and manual-review items
  2. Read references/differences.md (and refresh Codex docs if its Docs last checked date is old).

  3. Scan and inspect before writing:

    • --scan-only lists active and inactive source surfaces.
    • --plan prints staged Codex artifact paths and report rows.
    • --doctor summarizes readiness, manual-review work, and validation risks.

Read the full file on GitHub · 115 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 115 lines · 28 tokens per session scan C 145b7fe48360

Subscribe to this mod's changes

migrate-to-codex is a skill published in the GitHub repository Haohao-end/openagent (806 stars, last pushed 1mo ago), licensed MIT. It adds 28 tokens to every session and 1,915 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 2 findings (reads agent configuration directories, reads mcp configuration). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.