How to move Cursor rules to Claude Code (where each rule type goes)
Claude Code doesn’t read .cursor/rules, so your rules don’t come with you. The quick fix people suggest is to
paste them all into CLAUDE.md. That works, but it changes when each rule loads: Cursor attaches most rules only
some of the time, while everything in the project-root CLAUDE.md loads at the start of every session.
A better move is to map each Cursor rule type to the Claude Code feature that loads it at the same moment: always-on rules to
CLAUDE.md, file-pattern rules to .claude/rules/ with paths:, description rules to a skill,
and manual rules to a skill you call with /name.
The question comes from an
r/cursor thread,
“Easiest way to migrate to Claude Code if I basically only use Cursor Chat?” (16 Nov 2026). Most replies cover the
editor side, such as the Claude Code extension, diffs and plan mode. One reply points out that “your cursor rules do not come with you”
and suggests copying .cursor/rules into CLAUDE.md, and another asks whether people now keep
.cursor/rules and CLAUDE.md in sync by hand. This guide covers both.
Behaviour is taken from Cursor’s rules docs and Anthropic’s Claude Code docs on memory and rules and skills (checked 18 Nov 2026). Both tools change often; confirm on your version with the checks at the end.
The mapping
| Cursor rule | When Cursor uses it | Claude Code home | When Claude Code loads it |
|---|---|---|---|
Always ApplyalwaysApply: true |
Every chat | Project CLAUDE.md (or a .claude/rules/*.md file with no paths) |
At startup, every session |
Apply to Specific Filesglobs: |
When a matching file is in context | .claude/rules/<name>.md with paths: frontmatter, or a CLAUDE.md in that folder |
When Claude reads, writes or edits a matching file |
Apply Intelligentlydescription: only |
When the agent decides the description is relevant | A skill: .claude/skills/<name>/SKILL.md with a description |
The name and description are listed every session; the body loads when Claude (or you) invokes it |
| Apply Manually no fields |
When you @-mention it |
A skill with disable-model-invocation: true |
Only when you type /name. Its description stays out of context |
| User Rules | Every chat, every project | ~/.claude/CLAUDE.md or ~/.claude/rules/ |
Every session, every project |
| AGENTS.md (root and nested) | Root always; nested ones when working in that folder | Keep it. Current Claude Code reads AGENTS.md when there’s no CLAUDE.md, or import it with @AGENTS.md |
Root and above at startup; a subfolder’s file when Claude opens a file there |
Two notes on the table. Claude Code reads AGENTS.md on its own only from v2.1.277, and by default only when
there is no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md in your launch folder or
above it. And Anthropic’s docs say rules “load into context every session or when matching files are opened”, and suggest
skills for task-specific instructions that don’t need to be there all the time. That is why description rules become skills
rather than rules files.
Worked example: seven rules, flat copy vs mapped
A typical small TypeScript app has one always-on rule, three file-pattern rules (components, API handlers, migrations), two description rules (testing, RPC services) and one manual release checklist. We counted the rule bodies with the o200k_base tokenizer that Clogmeter uses. Claude’s own tokenizer gives different numbers, so read these as relative weights.
| Cursor rule | Type | Tokens | Where it goes |
|---|---|---|---|
general.mdc | Always | 84 | CLAUDE.md |
react-components.mdc | Globs src/components/**/*.tsx | 118 | .claude/rules/react-components.md |
api-handlers.mdc | Globs src/api/**/*.ts | 119 | .claude/rules/api-handlers.md |
migrations.mdc | Globs db/migrations/** | 85 | .claude/rules/migrations.md |
testing.mdc | Description | 122 | Skill testing |
rpc-services.mdc | Description | 88 | Skill rpc-services |
release.mdc | Manual | 124 | Skill release, manual only |
- Flat copy into
CLAUDE.md: 53 lines, about 740 tokens loaded every session, including the release checklist you use once a month and the migration rules on days you never touch the database. - Mapped: about 100 tokens at startup: the 84-token
CLAUDE.mdplus the two skill descriptions (about 20 tokens) in the skill listing. Each scoped rule adds its 85–119 tokens only when Claude works on a matching file. The release skill adds nothing until you type/release.
Seven short rules is a small setup. Real .cursor/rules folders often run to thousands of tokens, and the gap
grows with them. Anthropic’s target for each CLAUDE.md is under 200 lines.
Converting one file-pattern rule
Cursor, .cursor/rules/api-handlers.mdc:
---
globs: src/api/**/*.ts
alwaysApply: false
---
- Every handler validates its input with the zod schema in `src/api/schemas/`.
- Log with `logger` from `src/lib/logger.ts`, never `console.log`.
Claude Code, .claude/rules/api-handlers.md:
---
paths:
- "src/api/**/*.ts"
---
- Every handler validates its input with the zod schema in `src/api/schemas/`.
- Log with `logger` from `src/lib/logger.ts`, never `console.log`.
And a description rule as a skill, .claude/skills/testing/SKILL.md:
---
name: testing
description: How to write and run unit and integration tests in this repo
---
- Unit tests live next to the file as `*.test.ts` and run with `pnpm test`.
- ...
For the manual release checklist, add disable-model-invocation: true to the skill’s frontmatter so only /release runs it.
Five things that break in a straight copy
- Claude Code ignores Cursor’s frontmatter. The docs say
pathsis the only field Claude Code reads from a rule, and other fields are “ignored without an error”. A copied rule withglobs:ordescription:and nopaths:loads at launch, every session. Renameglobstopaths, and move description rules to skills. - The file extension changes. Cursor needs
.mdcand ignores plain.mdin.cursor/rules. Claude Code discovers.mdfiles under.claude/rules/, including subfolders. - Some globs match more. In Cursor,
*.tsmatches.tsfiles in the root only. In Claude Code, a pattern like*.mdmatches anywhere under the base directory, and/*.mdis the root-only form. Cursor separates patterns with commas; Claude Code takes a YAML list or a comma-separated string. @filemeans something different. In a Cursor rule,@migration-template.sqltells the agent where to look, and the file isn’t inlined. InCLAUDE.md,@pathis an import: the file loads into context together with theCLAUDE.md, every session. Wrap the path in backticks (`@migration-template.sql`) to keep it as plain text.- Broken YAML fails open. If a rule’s frontmatter doesn’t parse, Claude Code loads the rule as if it had no
paths, which means every session. Runclaude --debugto see the parse error.
If you keep using both tools
- Shared always-on rules: put them in one root
AGENTS.md. Cursor reads it, and current Claude Code reads it too when there’s noCLAUDE.md. If you need aCLAUDE.mdas well, start it with@AGENTS.mdand add Claude-only lines below; Anthropic documents that the import never makes Claude readAGENTS.mdtwice. Don’t also paste the same rules intoCLAUDE.md, or you pay twice and the copies drift. - Scoped rules: there’s no shared format. Cursor wants
.mdcwithglobs, and Claude Code wants.mdwithpaths. Pick one folder as the source and regenerate the other, or keep folder-specific rules in nestedAGENTS.mdfiles. Cursor loads those when it works in that folder, and Claude Code does the same when it is readingAGENTS.md(noCLAUDE.mdin your launch folder or above, and none in that subfolder). - Don’t convert everything on day one. One reply in the thread suggests overlapping the tools for a while. Move the always-on rules first, then add scoped rules when Claude gets something wrong in that area.
How to check what loaded
- Run
/context allin a fresh session and check the Memory files list. Run it again after Claude has edited a file undersrc/api/to see the scoped rule appear. - Run
/memoryto see and open yourCLAUDE.mdand rules files. - Check the skills list with
/skillsto see each skill and whether Claude can invoke it on its own. - Weigh the result. Paste your old
.mdcfiles into the Cursor rules token counter and your newCLAUDE.mdinto the CLAUDE.md token counter, then paste everything into Clogmeter to flag duplicates and always/never conflicts between the two tools’ files.