A plain-English guide to setting up your project so Claude Code and Codex can both work from the same context. The same pattern can support other coding agents too.
Every AI coding agent needs instructions, reusable workflows, and tool settings. Each tool names those files differently.
Claude Code looks for CLAUDE.md and .claude/.
Codex looks for AGENTS.md, .codex/, and .agents/skills/.
The fix: give each tool the files it expects, but keep your real project knowledge in shared folders like docs/, references/, and templates/.
Same idea, different file names and formats. Here's what each tool expects.
One folder holds settings, agents, and skills.
CLAUDE.mdSits at the project root. Loads automatically..claude/Holds skills, agents, rules, and settings..claude/skills/<name>/SKILL.mdSlash commands you can build yourself..claude/agents/<name>.mdMarkdown with a small header on top..claude/settings.jsonHooks, permissions, env vars.~/.claude/Same structure, but applies to every project on your machine.Config and agents live in .codex. Skills live in .agents.
AGENTS.mdSits at the project root. Loads automatically.AGENTS.override.mdQuick way to override AGENTS.md without editing it..codex/Holds config and agent definitions..agents/skills/<name>/SKILL.mdCodex scans from your current directory up to the repo root..codex/agents/<name>.tomlTOML format, not markdown..codex/config.tomlSandbox, MCP servers, env vars, profiles.~/.codex/ and ~/.agents/skills/Global config/agents live in ~/.codex. Global skills live in ~/.agents/skills.Global vs project: both tools support both. Global files live in your home folder and apply everywhere. Project files live inside one repo.
~/.claude/ mirrors .claude/. Codex splits global files: ~/.codex/ for config and agents, ~/.agents/skills/ for skills.
Claude keeps everything in one folder. Codex splits config and skills into two folders.
your-project/
CLAUDE.md
.claude/
settings.json
agents/
researcher.md
skills/
youtube-video/
SKILL.md
your-project/
AGENTS.md
.codex/
config.toml
agents/
researcher.toml
.agents/
skills/
youtube-video/
SKILL.md
When you forget where something lives, this table has the answer.
| What you need | Claude Code | Codex |
|---|---|---|
| Project instructions | CLAUDE.md | AGENTS.md |
| Project config folder | .claude/ | .codex/ |
| Where skills live | .claude/skills/<name>/SKILL.md | .agents/skills/<name>/SKILL.md |
| Where sub-agents live | .claude/agents/<name>.md | .codex/agents/<name>.toml |
| Agent file format | Markdown + YAML header | TOML |
| Hooks / permissions / env | .claude/settings.json | .codex/config.toml |
| Personal / temp override | CLAUDE.local.md | AGENTS.override.md |
| Global config | ~/.claude/ | ~/.codex/ + ~/.agents/skills/ |
| User-wide instructions | ~/.claude/CLAUDE.md | ~/.codex/AGENTS.md |
| Scoped subfolder instructions | Nested CLAUDE.md | Nested AGENTS.md |
Worth reading before you start. These are the differences you can't paper over.
Claude reads from .claude/skills/. Codex reads from .agents/skills/. Same basic SKILL.md shape, but Claude-specific tool names or hooks may need small edits for Codex.
A Claude agent is a .md file with a small YAML header. A Codex agent is a .toml file. The instructions inside are the same idea, just wrapped differently.
You can't copy .claude/settings.json into .codex/config.toml. They're different formats and configure different things. Keep them separate.
Both tools support a CLAUDE.md or AGENTS.md inside a subfolder for scoped instructions. Codex chains them from the repo root down to your current directory. The closer file wins.
Claude agents are markdown files. Codex agents are TOML files. The role prompt can be similar, but the wrapper and execution model are different.
Put reusable knowledge in docs/, references/, and templates/. Then both tools can read the same source instead of drifting apart.
Split your project into three layers. Shared knowledge in one place, workflows in another, tool-specific config in their own folders.
Separate content this way and you never write the same thing twice.
Lives in references/, docs/, templates/. Any agent reads it. Don't duplicate.
Same basic SKILL.md shape in two folders: .claude/skills/ for Claude, .agents/skills/ for Codex. Sync the files, then adapt tool-specific details if needed.
Stays in .claude/ and .codex/. These don't overlap. Don't try to merge them.
Pick your direction. Open the project in the target tool and paste the prompt — it will create all the adapter files for you.
Open your Claude Code project in Codex and paste this prompt.
The whole conversion idea: do not rebuild the project. Add a Codex layer beside the Claude layer.
Open your Codex project in Claude Code and paste this prompt.
The whole conversion idea: do not rebuild the project. Add a Claude Code layer beside the existing Codex layer.
The key differences: Claude agents are .md files with a YAML header, skills live in .claude/skills/ not .agents/skills/, and settings are JSON not TOML.
The setup only works if both tools stay in sync. These are the habits that matter.
When you update project instructions: keep CLAUDE.md and AGENTS.md aligned. Do not maintain two full copies. Pick one as the source of truth and make the other an adapter.
When you create a Claude skill: also copy it to .agents/skills/ if Codex should use it.
When you create a Claude agent: also create a matching .codex/agents/<name>.toml if Codex should spawn it.
When you add shared knowledge: put it in docs/, references/, or templates/ so every tool can read the same source.