Why Symlinking Cursor and Claude Code Rules Breaks Silently and How to Fix It
Developers using both Cursor and Claude Code AI tools on the same repository often attempt to share a single rules directory via symlink, but this approach fails in two distinct ways. Cursor only reads files with a .mdc extension while Claude Code reads .md files, meaning a shared directory will cause one tool to silently ignore all rules. The two tools also use different YAML frontmatter keys for scoping — Cursor uses globs and alwaysApply, while Claude Code uses a paths list — so a file written for one format is misread by the other without any error or warning. A proposed solution treats Claude Code's .md files as the single source of truth and uses a small, dependency-free Node.js script to automatically generate correctly formatted .mdc files for Cursor. This code-generation approach keeps both tools in sync from one canonical set of rules, eliminating the silent misconfiguration that symlinks introduce.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in