claude-codex-switchlisted
Install: claude install-skill gitgoready/claude-codex-switch
# Claude-Codex Switch Skill
Convert coding-agent sessions between **Claude Code** and **Codex** so you can
switch frameworks mid-task without losing context — typically because one
side's quota ran out.
Both directions are supported:
- **Claude → Codex**: reads `~/.claude/projects/<slug>/<id>.jsonl`, writes a
Codex `rollout-*.jsonl` under `~/.codex/sessions/YYYY/MM/DD/`, and registers
the session in `~/.codex/state_5.sqlite` so Codex lists it in history.
- **Codex → Claude**: reads `~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl`,
writes a Claude-compatible JSONL into `~/.claude/projects/<slug>/`, and
injects a `migration_boundary` system message so Claude's transcript shows
the origin clearly.
## When to use
The user says any of:
- "Convert this Claude session to Codex" / "把这次 Claude 会话转给 Codex"
- "Convert my Codex session to Claude" / "把 Codex 会话转成 Claude"
- "I hit my Codex quota, switch me to Claude with the same context"
- "Import this Claude rollout into Codex"
- "Migrate the session to the other agent"
## Migrated session title
Both directions produce a title with the pattern:
```
From Claude - <original session name> - YYYY-MM-DD HH:MM:SS
From Codex - <original session name> - YYYY-MM-DD HH:MM:SS
```
The original session name comes from:
- Claude → Codex: the first non-synthetic user message in the Claude session.
- Codex → Claude: the `title` column in Codex's `threads` table (looked up by
session id), falling back to the first user message.
Tim