Portable, version-controlled configuration for Claude Code and OpenAI Codex. Fork it, customize it, sync it across machines.
git clone https://github.com/petekp/claude-code-setup.git
cd claude-code-setup && ./setup.shThat's it. Both tools now use this repo's skills, commands, agents, and hooks.
The setup script symlinks this repo into ~/.claude/ and ~/.codex/:
~/.claude/ ~/.codex/
├── skills/ → <repo>/skills/ ├── skills/<each> → <repo>/skills/<each>
├── commands/ → <repo>/commands/ └── AGENTS.md ← assembled from instructions/
├── agents/ → <repo>/agents/
├── hooks/ → <repo>/hooks/
├── scripts/ → <repo>/scripts/
├── settings.json → <repo>/settings.json
├── CLAUDE.md ← assembled from instructions/
│
~/.mcp.json → <repo>/.mcp.json
Edit files in either location — they're the same files. Commit and push to sync across machines.
System instructions are assembled from source files in instructions/:
| Source | Claude Code (~/.claude/CLAUDE.md) |
Codex (~/.codex/AGENTS.md) |
|---|---|---|
instructions/common.md |
Yes | Yes |
instructions/claude-only.md |
Yes | — |
instructions/codex-only.md |
— | Yes |
Edit common.md for rules that apply to both tools. Use the tool-specific files for rules that reference tool-specific features (e.g. .claude/ paths, portless, Coordinator discipline).
Skills are symlinked individually into ~/.codex/skills/ (Codex doesn't support directory-level symlinks). Skills listed in codex-exclude are skipped — these are Claude-specific skills that would confuse Codex.
Claude Code reads MCP servers from ~/.mcp.json (symlinked). Codex reads them from ~/.codex/config.toml (manually managed). See instructions/mcp-servers.md for details.
- Fork this repo on GitHub
- Clone your fork and run
./setup.sh - See FORKING.md for customization guidance
# Push changes
git add -A && git commit -m "Update config" && git push
# Pull on another machine
git pull && ./setup.sh./setup.sh --undoRemoves symlinks, restores backed-up directories, and restores pre-assembly instruction files.
Some files aren't symlinked — they're templates or references for manual setup. See templates/README.md for details.
Skills/commands not appearing in Claude Code?
- Check symlinks:
ls -la ~/.claude/skills - Validate frontmatter:
./scripts/validate.sh - Restart Claude Code
Skills not appearing in Codex?
- Check symlinks:
ls -la ~/.codex/skills - Verify the skill isn't in
codex-exclude - Re-run
./setup.sh
Permission denied?
chmod +x setup.sh && ./setup.shPreview before running?
./setup.sh --dry-runWindows? Use WSL or set up symlinks manually.
MIT