Skip to content
trending

AI Tools

Sync Claude Code and Codex with rulesync, Ruler and More

Compare four tools for sharing rules, skills and MCP servers between Claude Code and Codex - and see when a small script is enough.

By 5 min read
Sync Claude Code and Codex with rulesync, Ruler and More

Update (9 Nov 2026): Claude Fable 5.2 and Mythos 5.2 are out - prices, access and benchmarks are in my Claude Fable 5.2 guide.

👁 116 reads

When I started working with Claude Code and Codex side by side, every change to my instructions meant editing two files. I would add a rule to Claude’s memory, then remember that Codex did not know about it. So I looked for a tool that could keep one set of rules, skills and MCP servers and distribute them automatically. I found several, all free and licensed under MIT. I did not install any of them.

Here, I compare four of the most interesting options and explain why a short script was enough for one person using two tools, while I would make a different choice for a team.

Tools for syncing at a glance

  • rulesync: broad support for rules, commands, MCP, subagents and skills across dozens of tools; install with npm
  • Ruler: one .ruler/ folder per project and a ruler apply command; skills support is experimental
  • agentsync: a global AGENTS.md, skills folder and MCP file; uses links instead of copies and supports backups and rollback
  • agent-rules-sync: a background service that keeps files in sync in both directions
  • My choice: Codex’s built-in options and a custom script of about 100 lines

One source of truth

All these tools work in much the same way. You keep rules, skills and MCP server definitions in one place, and the program writes them in the formats each tool expects: CLAUDE.md and a JSON file for Claude Code, AGENTS.md and config.toml for Codex, and separate rules files for Cursor. They differ in where that shared source lives, how many tools they support, and whether they distribute copies or links.

rulesync supports the widest range of content: rules, commands, MCP, ignore files, subagents and skills. Its list of supported tools includes dozens of options, including Claude Code and Codex CLI. Install it with npm install -g rulesync. Start with rulesync import --targets claudecode to bring an existing CLAUDE.md into a .rulesync/ folder, then run rulesync generate to distribute everything.

Ruler works at the project level. Write rules in Markdown files in the .ruler/ folder, put settings and MCP servers in ruler.toml, then use ruler apply to write them to your agents. Codex gets an AGENTS.md, MCP settings in .codex/config.toml and skills in .agents/skills/. The author labels skills support as experimental. Ruler requires Node.js version 20.19 or later.

Dealat Kinetyra
Replit Core - 12 months
$109 instead of $267 -59%
See the deal →

agentsync is built around global settings rather than a single project. You have one AGENTS.md, a skills/ folder and an mcp.json file, which the program links to more than 20 supported tools if it finds them on your computer. It creates links rather than copies, so a change in one place is immediately visible everywhere. It offers a preview without writing changes (--check), a mode that watches for changes (--watch) and rollback to a backup (--rollback latest). On Windows, linking folders requires Developer Mode if the system does not allow a regular symlink. The author also warns against putting mcp.json in a shared repository, since it can contain tokens.

agent-rules-sync goes further. Install it with pip install agent-rules-sync and it runs as a system service: change a rule in any tool and it distributes the change to the others. It syncs rules and skills in both directions, copies settings from Claude’s global configuration into selected repositories, and merges MCP server lists.

Codex handles some of the syncing itself

Before you install anything on this list, check what you actually need. Codex has two built-in options that solved most of my problem. The first is project_doc_fallback_filenames = ["CLAUDE.md"] in ~/.codex/config.toml: Codex then reads CLAUDE.md wherever there is no AGENTS.md, so project rules are shared without copying. The second is the skill format: a folder containing a SKILL.md file works in both tools; only the location they read it from differs.

That left me with global rules and skills. I wrote a global AGENTS.md once and pointed Codex to Claude’s memory folder as a knowledge base, so project notes are shared too. For skills, a script was enough: it copies them from ~/.claude/skills to ~/.agents/skills without touching skills I had created manually in Codex. I share it, along with the full process, in this article: [pwlink slug=”claude-code-do-codexa”]How to move from Claude Code to Codex[/pwlink].

I have six custom skills, one person at the keyboard and two tools. A program running as a background service would solve a problem I do not have and add another place where something could go wrong. I also had trouble with Codex’s official importer: in a test using a Polish-language file, it failed on Polish diacritics in the first file.

When to use a dedicated tool

The calculation changes in three situations:

  • A team using different tools. One person works in Cursor, another in Claude Code and a third in Codex, but the project’s rules need to be the same everywhere. In that case, rulesync or Ruler in the repository can keep things in order in a way that would be hard to maintain by hand.
  • More than three tools on one computer. If you use Claude Code, Codex, Gemini CLI and Cursor at the same time, agentsync’s links can save a lot of work.
  • Frequent MCP server changes. Each tool stores them in a different format: Codex uses TOML and Claude uses JSON. Re-entering them by hand can quickly cause problems.

For two tools and one person, I would start with Codex’s built-in options. If you also start connecting Claude Code and Codex in the other direction, see this article about the [pwlink slug=”wtyczka-codex-claude-code”]official Codex plugin for Claude Code[/pwlink]. A dedicated tool is worth adding when keeping two places in sync by hand becomes a burden. For me, after changing a skill, one command is enough: python synchronizuj-skille.py.

Google · Your sourcesQuantslant higher in your Google - one clickAdd to preferred sources →

Sources

  • rulesync: https://github.com/dyoshikawa/rulesync
  • Ruler: https://github.com/intellectronica/ruler
  • agentsync: https://github.com/x0c/agentsync
  • agent-rules-sync: https://github.com/dhruv-anand-aintech/agent-rules-sync
  • OpenAI, Custom instructions with AGENTS.md: https://learn.chatgpt.com/docs/agent-configuration/agents-md
  • OpenAI, Agent Skills: https://learn.chatgpt.com/docs/build-skills
// read next

More on this from QUANTSLANT

Piotr Olszewski

Editor and publisher · Quantslant

I edit and publish Quantslant. AI tools help with research, drafts and translation; choosing topics, running the tests, checking facts and the decision to publish are mine, and so is the responsibility for what appears here.

read nextguidesBest AI for Physics? Gemini, ChatGPT and a Vertical Motion TestGemini scored 130/130 and ChatGPT 129/130 in a Polish school-level AI ranking. Here’s what the results mean for physics problems.

Most read

  1. 1Best AI Video Generator Apps for Your Phone (2026)
  2. 2Claude Opus 5.5 Motion Graphics: 60s Showreel from One Prompt
  3. 3Wan 2.2 on RTX 4090: timings, VRAM and four test clips
// site map

This page in other languages5

Quantslant in numbers 1,423posts in archive22news from the last 7 days18video models in the observatory
🎬 AI Video Benchmarks: Higgsfield DoP vs OpenAI Sora • Higgsfield vs Runway Gen-3 • AI Video Credit Calculator
× ‹ enlarge ›