{"slug": "how-to-sync-cursor-rules-claude-md-and-agents-md-across-projects-without-config", "title": "How to Sync Cursor Rules, CLAUDE.md, and AGENTS.md Across Projects Without Config Drift", "summary": "A developer from Blume outlines five approaches to syncing agent configuration files like CLAUDE.md, .cursor/rules, and AGENTS.md across projects to prevent config drift. The methods range from symlinks and hard links to tools like ai-rules-sync and RuleSync, with Blume offering a higher-level solution that detects behavioral drift. The post emphasizes that identical copies of outdated rules are still problematic.", "body_md": "If you use Claude Code and Cursor, or you work across more than a handful of repos, you have met config drift: the CLAUDE.md in one project says one thing, the `.cursor/rules`\n\nin another says something else, and the AGENTS.md you wrote for Codex is three months behind both. Every agent gets a slightly different briefing, so every agent behaves slightly differently, and nobody can say which copy is the truth.\n\nThis post covers the five practical approaches to keeping agent configuration in sync, from zero-dependency symlinks to purpose-built tools.\n\nDisclosure: I work on [Blume](https://blume.codes), which appears as one of the five options. The other four are covered on their merits, and for many setups one of them is all you need.\n\nEvery agent invented its own config location: Claude Code reads `CLAUDE.md`\n\nand `.claude/`\n\n(rules, skills, hooks, settings), Cursor reads `.cursor/rules/*.mdc`\n\n, Codex reads `AGENTS.md`\n\n, and Copilot, Gemini CLI, and the rest have their own variants. The knowledge is 90 percent identical, but it lives in N places times M repos.\n\nMake one file the source of truth and link the rest to it:\n\n```\n# AGENTS.md is the master; CLAUDE.md points at it\nln -sf AGENTS.md CLAUDE.md\n```\n\nA popular variant centralizes everything in one `.agents/`\n\n(or `.ai/`\n\n) folder in the repo and symlinks each tool's expected path into it. Update the master file and every tool sees the change instantly.\n\n**Good for:** single repo, cross-tool consistency.\n\n**Limits:** does nothing across repos, and symlink behavior on Windows can be a headache for mixed teams.\n\nSame idea, but the same physical file exists at multiple paths. Some prefer this because every path looks like a real file to tools that resolve symlinks oddly.\n\n**Good for:** the same cases as symlinks, with slightly different edge cases.\n\n**Limits:** hard links silently break when a tool replaces a file instead of editing it in place, which is exactly what some formatters and generators do. Drift returns without warning, which is worse than obvious drift.\n\n[ai-rules-sync](https://github.com/lbb00/ai-rules-sync) manages rules, skills, commands, and subagents in a git repository and syncs them into projects via symlinks. It explicitly supports Cursor, Claude Code, Copilot, OpenCode, Trae, Codex, Gemini CLI, and Warp, which makes it the broadest cross-tool option.\n\n**Good for:** individuals and teams who want one git repo as the canonical rule set across many projects and many tools.\n\n**Limits:** you are adopting a tool and its conventions; the sync is still file-copy-shaped, so what to sync and when stays a human decision.\n\n[RuleSync](https://www.rulesync.dev/) distributes CLAUDE.md, .cursorrules, and settings files across repos with `npx rulesync-cli pull`\n\n, and it runs in CI. Adding it to postinstall means every checkout gets current rules automatically.\n\n**Good for:** teams that want rule distribution to be part of the build, not a manual step.\n\n**Limits:** pull-based distribution keeps files identical, but it cannot tell you whether the rules themselves are still correct.\n\nThe four options above all solve copying: making sure the same bytes exist in the right places. [Blume](https://blume.codes) works on the layer above that. It is a desktop app that manages rules, skills, hooks, and the rest of your agent dotfiles centrally across Claude Code, Codex, and Cursor, and then does the part copying cannot: it watches how your agents actually behave, detects when setup and instructions have drifted apart (a rule one agent ignores, configs that contradict each other, a hook that never fires), and proposes fixes you approve or reject.\n\nSync tools keep copies identical. Identical copies of a rotten rule set are still rotten, and that second failure mode is the one that quietly degrades agents over months.\n\n**Good for:** multi-agent setups where the config has grown beyond easy manual review.\n\n**Limits:** it is a desktop app, so if you need headless CI distribution, pair it with option 3 or 4 rather than replacing them.\n\n| Situation | Start with |\n|---|---|\n| One repo, two tools | Symlinks |\n| Many repos, one person | ai-rules-sync |\n| Team, rules must ship with checkout | RuleSync in postinstall |\n| Multi-agent, config grown past manual review | Blume, plus symlinks in-repo |\n\nThese compose. A common stack is AGENTS.md as the in-repo master with symlinks, a git-backed rule repo for cross-project sharing, and something watching for drift on top.\n\n**Which file should be the master?**\n\nAGENTS.md, because most agents now read it natively (Codex, Cursor, Copilot CLI, Gemini CLI, and Claude Code). Keep genuinely Claude-specific instructions in a small CLAUDE.md that defers to it.\n\n**Should agent config be committed?**\n\nProject-level rules, yes: they are institutional knowledge and belong in review. Personal preferences and secrets, no.\n\n**How do I know if my configs have already drifted?**\n\nQuick check: `diff CLAUDE.md AGENTS.md`\n\nin any repo where both exist as real files, and compare rule counts across your most-touched repos. If you find contradictions in five minutes of looking, there are more you did not find.\n\nIf you have a sync setup I did not cover, especially for larger teams, drop it in the comments.", "url": "https://wpnews.pro/news/how-to-sync-cursor-rules-claude-md-and-agents-md-across-projects-without-config", "canonical_source": "https://dev.to/pederaa/how-to-sync-cursor-rules-claudemd-and-agentsmd-across-projects-without-config-drift-23f8", "published_at": "2026-08-05 13:48:21+00:00", "updated_at": "2026-08-05 14:03:14.361481+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "ai-tools"], "entities": ["Blume", "Claude Code", "Cursor", "Codex", "ai-rules-sync", "RuleSync", "Copilot", "Gemini CLI"], "alternates": {"html": "https://wpnews.pro/news/how-to-sync-cursor-rules-claude-md-and-agents-md-across-projects-without-config", "markdown": "https://wpnews.pro/news/how-to-sync-cursor-rules-claude-md-and-agents-md-across-projects-without-config.md", "text": "https://wpnews.pro/news/how-to-sync-cursor-rules-claude-md-and-agents-md-across-projects-without-config.txt", "jsonld": "https://wpnews.pro/news/how-to-sync-cursor-rules-claude-md-and-agents-md-across-projects-without-config.jsonld"}}