Codex to Claude Handoff
Custom skill created by Maggie Lerman.
Create Claude Code project files that mirror Codex repository rules. Use this skill when the user wants Claude Code to follow the same repo policies Codex uses.
Quick start
Run a dry run first:
python3 "$HOME/.codex/skills/codex-to-claude-handoff/scripts/setup_claude_repo.py" \
--repo /absolute/path/to/repo \
--dry-run
Apply changes:
python3 "$HOME/.codex/skills/codex-to-claude-handoff/scripts/setup_claude_repo.py" \
--repo /absolute/path/to/repo
Force overwrite generated files after source changes:
python3 "$HOME/.codex/skills/codex-to-claude-handoff/scripts/setup_claude_repo.py" \
--repo /absolute/path/to/repo \
--force
Workflow
- Identify Codex source instructions.
- Run the generator script with
--dry-runfirst. - Re-run without
--dry-runto write files. - Verify
CLAUDE.mdimports the intended source files. - Review
.claude/settings.jsonallow/ask/deny rules and tighten if needed. - If the repo has a docs system, update docs so contributors know Claude setup and governance.
- Record the change in project tracking docs (
CHANGELOG, active project log/checkpoint) if the repo uses them.
Source discovery rules
If --source is not provided, the script searches in this order:
AGENTS.md.github/copilot-instructions.md- Any
AGENTS.mdfound recursively in the repo
Use --source (repeatable) to pin exact files:
python3 "$HOME/.codex/skills/codex-to-claude-handoff/scripts/setup_claude_repo.py" \
--repo /absolute/path/to/repo \
--source AGENTS.md \
--source docs/engineering/agent-rules.md
Generated files
CLAUDE.md: Claude entrypoint with@...imports to Codex source files and generated rule file..claude/rules/00-codex-parity.md: Extracted policy-style rules from source instructions..claude/settings.json: Project-level Claude permission defaults (skipped with--skip-settings).
Required parity checks
To match the full handoff flow used in shopify-bulk-editor-app, do all of the following after generation:
- Confirm
CLAUDE.mdclearly points Claude to canonical source rules (AGENTS.mdand any repo-specific policy files). - Confirm
.claude/settings.jsonincludes:- safe defaults (
defaultMode,disableBypassPermissionsMode) - low-risk commands in
allow - push/merge actions in
ask - destructive commands in
deny
- safe defaults (
- If
docs/exists, add or update a Claude setup page (for exampledocs/development/claude-code-setup.md) describing:- policy precedence (
AGENTS.mdfirst) - the role of
CLAUDE.md - the role of
.claude/settings.json
- policy precedence (
- Update docs navigation/index pages that should surface the Claude setup page.
- Update project tracking docs used by the repo (for example
CHANGELOG.mdand active checkpoint logs). - Run a docs build check when docs structure changed.
Output expectations
- Keep source instruction files authoritative.
- Generate minimal, readable Claude files that are safe to regenerate.
- Avoid manual duplication drift by re-running the script after source updates.
Read references/claude-file-map.md when you need file-role details.