12 min read

Moving From Cursor to Claude Code: Which Cursor Rules Still Work (5 Rules, 36 Test Sessions)

Claude Code read none of a project's five Cursor rules until we ported them. The mapping that worked, and the copy-paste shortcut that costs 3,220 tokens.

Moving From Cursor to Claude Code: Which Cursor Rules Still Work (5 Rules, 36 Test Sessions)

A recent r/cursor thread about leaving for Claude Code got the reply you'd expect. Move your Cursor rules into CLAUDE.md and carry on. That advice is half right, and the half it skips is where the tokens go.

We took a public project with five real Cursor rules and an MCP config, and ran it through Claude Code four ways. Left alone, Claude Code loaded none of the rules. Copied into .claude/rules as .mdc files, still none. Renamed to .md, all five loaded, including the two that were meant for specific file types, in every session. Only a proper port gave each rule the scope it had in Cursor.

How we tested: We took v3-admin-vite, a public project with 5 Cursor rules and a .cursor/mcp.json (commit c2c895d), built four versions of it, plus a variant of the port, and in November 2026 ran 36 headless sessions of Claude Code 2.1.323 on Claude Sonnet 5.5, with one small task per kind of rule. A logging hook recorded every instruction file Claude Code loaded. Every number below comes from those runs. The terminal listing and the MCP check are five more sessions.

What did we port, and where did each rule go?

The project's .cursor/rules folder covers three of Cursor's four rule types (it has no Apply Manually rule). The rules are written in Chinese, and the first one tells the model to always reply in Simplified Chinese. That turned out to be useful. You can see at a glance whether a rule reached the model.

Cursor file Cursor rule type Where we put it in Claude Code Obeyed after the port?
index.mdc Always Apply CLAUDE.md Yes, 2 of 2 runs replied in Chinese
project.mdc Always Apply CLAUDE.md Partly visible, see the code section
ts.mdc Apply to Specific Files, *.ts,*.tsx,*.d.ts .claude/rules/ts.md with paths: Loaded on the first .ts file in every run that opened one
vue.mdc Apply to Specific Files, *.vue .claude/rules/vue.md with paths: Loaded on the first .vue file in every run that opened one
git.mdc Apply Intelligently (description only) a skill, .claude/skills/git-commit/SKILL.md Yes, 2 of 2 commits followed it
mcp.json MCP server by URL .mcp.json with a type added Connected, 2 tools available

The rule types are Cursor's own names, from its rules docs (checked November 18, 2026). We didn't run Cursor for this post, so how Cursor applies each type comes from that page and not from a test.

One thing about the project itself. It already ships a CLAUDE.md, an AGENTS.md and a few skills next to its Cursor files. We deleted all of those from every test copy, so the starting point is a project that has only ever used Cursor.

What does Claude Code do with a .cursor/rules folder?

Nothing. In 9 runs on the untouched project, the hook logged zero instruction files. We asked the same question in the Cursor-only copy and in the ported copy, and this is the terminal output.

$ cd cursor-only
$ ls .cursor/rules
git.mdc    index.mdc    project.mdc    ts.mdc    vue.mdc

$ claude -p "What does src/common/utils/validate.ts export? Answer in two sentences."
`src/common/utils/validate.ts` exports three validation helpers: `isArray`, which
checks whether a value is an array, and `isString`, which checks whether a value
is a string primitive or `String` object. It also exports `isExternal`, which uses
a regex to test whether a path starts with `http:`, `https:`, `mailto:` or `tel:`.

$ cd ../ported
$ ls CLAUDE.md .claude/rules
CLAUDE.md

.claude/rules:
ts.md    vue.md

$ claude -p "What does src/common/utils/validate.ts export? Answer in two sentences."
该文件导出三个校验函数:`isArray`(判断是否为数组)、`isString`(判断是否为字符串)和
`isExternal`(判断路径是否为外链)。其中 `isExternal` 通过正则匹配 `http(s):`、`mailto:`、
`tel:` 开头的路径。

Both commands also carried --model claude-sonnet-5-5 --setting-sources project --strict-mcp-config, which we cut from the listing for width. We also put back the quotes around the prompt, which the demo script did not print. Long lines are wrapped. We tried to capture this as a screenshot and the capture failed, so you get the text.

The commit task shows the same gap. The project's git.mdc asks for commits shaped like type: message with a fixed list of types, and says never to work on the main branch. We staged a change that only adds return types, then said "Commit the current change."

Setup Commit subject Branch
Cursor files only (2 runs) Add explicit boolean return types to validate utils main
Ported (2 runs) types: 为 validate 工具函数补充返回值类型 new branch types/validate-return-type

Without the rule, Claude Code committed straight to main. With it, Claude Code made a branch first and picked types, the type the rule lists for type-related changes.

Can you just copy the .mdc files into .claude/rules?

This is the obvious shortcut, and it fails in two different ways.

Copied as .mdc. Nothing loads. Four runs, zero instruction files, English replies, a commit on main. Claude Code's memory docs (checked November 18, 2026) say it discovers .md files in .claude/rules, and our runs agree. The first request was within 3 tokens of the untouched project's.

Renamed to .md, frontmatter untouched. Everything loads, all the time. All five files loaded at session start in all four runs, including ts.md and vue.md. The docs explain why. In a rule file, paths is the only frontmatter field Claude Code reads, and any other field "is ignored without an error". Cursor's globs: and alwaysApply: false are other fields. So a rule that Cursor attached to .vue files becomes a rule Claude Code sends with every request.

The rules were obeyed in this setup. Replies came back in Chinese and the commit followed the format. But look at what the first request cost.

Setup First request, tokens Extra
Cursor files only 19,900
.mdc copies in .claude/rules 19,903 +3
Proper port 20,711 +811
Renamed to .md 23,120 +3,220

The port's 811 is its cost at session start. Its scoped rules add their text when Claude opens a matching file, and we didn't measure that later growth.

These five rule files are small, 5,963 bytes together. A project with 20 rules for different parts of the codebase would pay for all 20 on every request, in every session, whether or not the session touches those files. We measured the fixed overhead of a CLAUDE.md and of MCP tools on every request in our Claude Code limit test.

Which port made every rule type work?

Four moves, one per Cursor concept. We didn't edit or translate any rule text.

Always Apply rules go into CLAUDE.md

We pasted the bodies of index.mdc and project.mdc into a CLAUDE.md at the project root and dropped the frontmatter. It loaded at session start in all 10 runs of this setup. Replies switched to Chinese in both language runs.

File-scoped rules go into .claude/rules with paths

Keep the rule body, swap the frontmatter.

---
paths:
  - "**/*.ts"
  - "**/*.tsx"
  - "**/*.d.ts"
---

The hook log shows what "scoped" means in practice. ts.md loaded the moment Claude read datetime.ts, vue.md loaded when it read Admin.vue, and neither loaded during the commit task, which opened no source file.

So what happens when Claude creates a new file and hasn't read a matching one yet? We tested that case on its own. We told Claude to create src/common/utils/clamp.ts without reading anything first. In both runs it wrote the file, then the rule loaded (triggered by the new file's path), then Claude edited the file it had just written to add readonly to the option properties, because ts.mdc asks for that. In the second run it said, in Chinese, between the two calls that the standard requires readonly and that it would adjust the file.

The rule works on new files. It arrives one step late, and Claude fixes its own first draft. That cost one extra turn in each run (3 turns against 2).

Apply Intelligently rules become a skill, or an unscoped rule

Cursor's description-only rules have no direct twin in .claude/rules. We tried both of the candidates.

As a skill, with the rule's own description in the skill's frontmatter, Claude called the git-commit skill as its first tool call in both runs, before it looked at the diff. As a rule file with no paths, the text loaded in every session and was followed in both runs too. The difference is in the tokens. With the unscoped rule, the first request was 434 tokens larger than with the skill (21,134 against 20,700). The skill puts only its name and description in context until something triggers it. For a commit rule you need once a session, we'd pick the skill.

One detail varied. The rule says to work on a personal branch and gives no naming scheme. The skill runs named the branch types/validate-return-type, the unscoped-rule runs feat/validate-return-types, and the renamed-files run types/validate-return-types. If branch names matter to you, write the scheme into the rule.

One limit of this test. The change already existed when we asked for the commit. A skill that loads at commit time can't stop edits on main before that, so a branch rule that must hold from the first edit belongs in CLAUDE.md.

The MCP config needs one more field

Cursor's file for this project is a server name and a URL.

{ "mcpServers": { "vite": { "url": "http://localhost:3333/__mcp/sse" } } }

Copied to .mcp.json unchanged, the server never showed up. The headless run printed nothing on stderr. Claude just answered that it had no tools from a vite server. The reason appears in two places you have to go looking for. One is the mcp_server_errors field of the stream-json init event, and the other is claude mcp list. Both say the server was skipped because the entry has a url but no type. The MCP docs say the same thing. Without a type, Claude Code reads the entry as a local stdio server.

With "type": "sse" added, the server connected, two tools appeared (get-vite-config and get-vite-module-info), and Claude called one. We ran this against the project's real dev server (Vite 7.3.6 with vite-plugin-mcp 0.3.2). A small surprise there. When the dev server starts and a .mcp.json already exists, that plugin rewrites the file itself and puts the type in. We checked by putting the untyped copy back and starting the dev server again, and the file came out with "type": "sse" in it. So in this one project, starting the dev server once repairs the lazy copy.

We passed the file with --mcp-config in headless mode. We didn't see the approval prompt an interactive session shows for a project's MCP servers.

How much did the rules change the code Claude wrote?

Less than the language and commit results suggest.

On the two coding tasks (a byte-formatting utility with a test, and a status badge component), the Cursor-only runs already matched most of what ts.mdc and vue.mdc ask for. An interface for the options object, no any, the component in a PascalCase folder with index.vue, <script lang="ts" setup>, type-based props. Claude read the neighbouring files before writing, and the existing code shows those conventions.

Check Cursor files only (run 1 / run 2) Ported (run 1 / run 2)
Named constants in the utility UNITS only / UNITS only 4 / 4, such as BINARY_BASE and DECIMAL_BASE
Chinese characters in the new utility file 0 / 66 94 / 88
Explicit return type on the exported function yes / no yes / yes
Props destructured from defineProps no / yes yes / yes
Label logic in a computed no / yes yes / yes

The ported runs were consistent and the Cursor-only runs weren't. Named constants for the bases (the rule against magic values) and comments in the project's language showed up every time with the rules and only sometimes without. With one or two runs per cell, treat this table as a direction, not a measurement. No tests ran in any session. Claude tried npx vitest in all six utility runs and the headless run denied it, because only ls was pre-approved. So we can't tell you whether the code works.

A rule that repeats what your codebase already shows buys you consistency. A rule that goes against the model's defaults (a reply language, a commit format, a branch policy) is the kind you lose completely when it doesn't load.

Do /init and /import do the port for you?

Claude Code has two commands for this, and its docs list both under migrating from other tools. We ran each headless in a fresh Cursor-only copy.

/init reads .cursor/rules and writes one CLAUDE.md. We ran it twice. Both times we got an English summary of about 3,400 bytes with commands, architecture, and a short conventions section taken from the Cursor rules (three bullets in the first run, five in the second). No .claude/rules folder and no .mcp.json either time. Everything lands in the one always-on file, and the first request grew by 1,632 and 1,720 tokens in the two runs.

A summary loses things. The first run dropped the reply-in-Chinese rule. The second kept it as a remark ("The .cursor/rules files instruct replying in Simplified Chinese") and Claude still answered in English. Both summaries kept the commit format and the branch rule, and both commits left main. But both dropped the one-line meaning of each commit type, and one of the two commits came out as refactor: where the original rule produces types:.

/import cursor is the configuration importer. In headless mode with --dry-run it reported 6 project-level items in .cursor/ and declined to import them. Its reason was that anyone with write access to a repository can author project config, so you should review each item yourself in the interactive picker that claude import opens. We didn't run that picker, so we can't say what it writes from a rules folder. It also listed the Cursor items that have no file to import, such as User Rules and Memories, which live in Cursor's settings.

What would we do on a real migration?

If your project has a handful of rules, port them by hand. It took four file moves here and no rewriting.

  1. Paste every Always Apply rule into CLAUDE.md.
  2. Move each file-scoped rule to .claude/rules/name.md and replace globs: with a paths: list. We wrote **/*.ts where Cursor had *.ts. The docs say a bare *.ts also matches at any depth, and we didn't test that form.
  3. Turn each description-only rule into a skill with the same description, or into a rule with no paths if it must apply every time.
  4. Copy .cursor/mcp.json to .mcp.json and add a type to every entry that has a url.
  5. Ask one question whose answer shows a rule working, the way the Chinese reply did for us. If you want proof instead of an impression, the InstructionsLoaded hook logs every file Claude Code loads and why.

If you only use /init, read the file it writes against your rules, line by line. It's a summary, and the rule it drops may be the one you care about.

And don't rename .mdc to .md and call it done. It looks like it works, because the rules are obeyed. You just pay for every scoped rule on every request.

We ran all of this headless, on one model, in short sessions. Whether rules hold up late in a long session is a different test. If you want the wider comparison between the two tools, we have Cursor, Copilot and Claude Code side by side, and the same kind of measured run for OpenCode against Claude Code. If your port turned up a rule type we didn't cover, tell us on X at @devtoolpicks.

Frequently Asked Questions

Does Claude Code read AGENTS.md?

Yes, with a condition. Claude Code's memory docs (checked November 18, 2026) say it reads AGENTS.md as the project instructions when there is no CLAUDE.md in the working directory or above it, from version 2.1.277. If a CLAUDE.md exists, only that file loads, unless it imports AGENTS.md with a line that says @AGENTS.md. We did not test this. We removed AGENTS.md from our test copies so the Cursor rules were the only instructions.

Can Cursor and Claude Code share one rules file in the same project?

They can share AGENTS.md. Cursor's docs say it supports AGENTS.md in the project root and in subdirectories, and Claude Code's docs describe a one-line CLAUDE.md that imports it with @AGENTS.md. The project we tested ships exactly that pair next to its .cursor/rules folder. What cannot be shared is the scoping. Cursor reads globs from .mdc frontmatter, Claude Code reads paths from .claude/rules, Claude Code did not read .cursor/rules in our runs, and Cursor's rules docs list no .claude/rules support.

Found this useful? Follow @devtoolpicks on X for more honest tool comparisons.
Share: X/Twitter | LinkedIn |

Get honest tool comparisons in your inbox

Join 50+ indie hackers and solo developers who get new comparisons, pricing changes, and tool picks. No spam. Unsubscribe anytime.