Skip to content
 
 

Repository files navigation

Claude Code + Codex + Copilot CLI Setup

Portable, version-controlled configuration for Claude Code, OpenAI Codex, and GitHub Copilot CLI. Fork it, customize it, sync it across machines.

Quick Start

git clone https://github.com/petekp/claude-code-setup.git
cd claude-code-setup && ./setup.sh

That's it. Both tools now use this repo's skills and scripts.

How It Works

The setup script symlinks this repo into ~/.claude/:

~/.claude/
├── skills/    → <repo>/skills/
├── scripts/   → <repo>/scripts/
├── settings.json → <repo>/settings.json
├── statusline-command.sh ← <repo> (copied)
│
~/.mcp.json    → <repo>/.mcp.json
~/.copilot/mcp-config.json → <repo>/.mcp.json

Edit files in either location — they're the same files. Commit and push to sync across machines.

Codex Skill Syncing

Skills are symlinked individually into ~/.codex/skills/ (Codex doesn't support directory-level symlinks) by scripts/sync-codex-skills.sh, which runs automatically on every Claude Code session start. Skills listed in codex-exclude are skipped — these conflict with Codex built-ins or would show up as duplicates.

Copilot CLI Skill Syncing

Skills are symlinked individually into ~/.copilot/skills/ by scripts/sync-copilot-skills.sh, which also runs automatically on every Claude Code session start. Skills listed in copilot-exclude are skipped.

Both CLAUDE.md and AGENTS.md are already read natively by Copilot CLI (in git root & cwd), so per-repo instructions need no conversion — just make sure an AGENTS.md (or CLAUDE.md) exists in each project.

MCP Servers

Claude Code reads MCP servers from ~/.mcp.json (symlinked). Copilot CLI reads the same JSON shape from ~/.copilot/mcp-config.json (also symlinked, via ./setup.sh) and from any project-level .mcp.json/.github/mcp.json. Codex reads them from ~/.codex/config.toml (manually managed, since its format differs).

Fork and Customize

  1. Fork this repo on GitHub
  2. Clone your fork and run ./setup.sh
  3. See FORKING.md for customization guidance

Syncing

# Push changes
git add -A && git commit -m "Update config" && git push

# Pull on another machine
git pull && ./setup.sh

Undo

./setup.sh --undo

Removes symlinks and restores backed-up directories.

Reference Files

Some files aren't symlinked — they're templates or references for manual setup. See templates/README.md for details.

Troubleshooting

Skills/commands not appearing in Claude Code?

  1. Check symlinks: ls -la ~/.claude/skills
  2. Validate frontmatter: ./scripts/validate.sh
  3. Restart Claude Code

Skills not appearing in Codex?

  1. Check symlinks: ls -la ~/.codex/skills
  2. Verify the skill isn't in codex-exclude
  3. Start a Claude Code session (the sync hook runs on SessionStart), or run ./scripts/sync-codex-skills.sh directly

Skills not appearing in Copilot CLI?

  1. Check symlinks: ls -la ~/.copilot/skills
  2. Verify the skill isn't in copilot-exclude
  3. Start a Claude Code session (the sync hook runs on SessionStart), or run ./scripts/sync-copilot-skills.sh directly
  4. Run /env inside a Copilot CLI session to confirm instructions, MCP servers, and skills are detected

Permission denied?

chmod +x setup.sh && ./setup.sh

Preview before running?

./setup.sh --dry-run

Windows? Use WSL or set up symlinks manually.

License

MIT

About

My forkable Claude Code setup with sync feature

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages