A Claude Code skill that migrates a Claude Code project's .claude/ configuration — slash commands, skills, subagents, and CLAUDE.md — into the equivalent Codex CLI (AGENTS.md + .codex/) and Gemini CLI (GEMINI.md + .gemini/) configurations.
From inside Claude Code (any working directory):
/migrate /absolute/path/to/target/repo
The skill will:
- Validate that the target path exists and contains
.claude/. - Read
CLAUDE.mdand everything under.claude/commands/,.claude/skills/,.claude/agents/. - Generate, in the same target repo:
AGENTS.md(Codex top-level instructions, with@-imports inlined).codex/prompts/<name>.md(one per Claude command/skill, plusagent-<name>.mdper subagent)GEMINI.md(Gemini top-level instructions,@-imports rewritten as@{...}).gemini/commands/<name>.toml(one per Claude command/skill, plusagent/<name>.tomlper subagent)MIGRATION_REPORT.mddescribing what was migrated and what still needs manual review.
The source .claude/ directory is never modified.
- Codex prompts only auto-load from
~/.codex/prompts/. The generatedAGENTS.mdincludes a one-lineln -s(orcp -r) command to activate the repo's.codex/prompts/for the current user. - Codex custom prompts are invoked as
/prompts:<name>, not/<name>(CLI-imposed prefix). - Subagents lose auto-dispatch on both targets — they're flattened into manually-invokable commands (
/prompts:agent-<name>for Codex,/agent:<name>for Gemini). - Codex doesn't support
@fileimports or Claude's bang-backtick shell-injection syntax. The migrator inlines@-references and annotates each shell-injection block with aTODO(migrate)comment for manual fixes. - Gemini collapses positional/named args (
$1,$NAMED) into a single{{args}}token — best-effort.
The generated MIGRATION_REPORT.md lists every dropped frontmatter field and every block that needs manual review.
See .claude/skills/migrate/SKILL.md for the full mapping spec.