cursor2claude
Migrate your Cursor AI rules to Claude Code config — automatically converts .cursorrules to CLAUDE.md with rule equivalence mapping and manual review hints.
cursor2claude
Translate Cursor IDE rules into a single, tidy
CLAUDE.mdso Claude Code understands your project.
✨ Why?
Cursor lets you write granular .mdc rules that keep its AI agent on‑brand.
Claude Code only looks at one Markdown file – CLAUDE.md. Keeping those in sync is a chore.
cursor2claude is a tiny CLI that:
- Scans
.cursor/rules/**/*.{md,mdc}at any depth - Categorizes rules (always‑apply • context‑specific • other)
- Decides whether to inline short / critical rules or import long ones
- Writes / updates
CLAUDE.md, preserving any notes below a marker - Offers
sync,watch, andstatuscommands for smooth DX.
Write a rule once ⇒ both AIs follow it.
🚀 Quick Start
One-off (no install required)
# pnpm
pnpm dlx cursor2claude sync
# npm
npx cursor2claude sync
# Yarn (≥2 / Berry)
yarn dlx cursor2claude sync
Install as a dev-dependency
# pnpm
pnpm add -D cursor2claude
pnpm cursor2claude sync
# npm
npm install --save-dev cursor2claude
npx cursor2claude sync # or add to package.json scripts
# Yarn
yarn add -D cursor2claude
yarn cursor2claude sync
📋 Commands
cursor2claude sync # One-time sync of rules to CLAUDE.md
cursor2claude watch # Watch for changes and auto-sync
cursor2claude status # Check current sync status
🔧 How It Works
- Discovers all
.mdand.mdcfiles in.cursor/rules/ - Parses YAML frontmatter to understand rule properties
- Categorizes rules based on
alwaysApplyanddescriptionfields - Generates a clean
CLAUDE.mdwith:- Auto-generated header
- Organized rule imports
- Preserved user content below marker
Rule Types
- Always-Apply Rules: Global context rules (
alwaysApply: true) - Agent-Selected Rules: Context-specific rules with descriptions
- Other Rules: Manual or auto rules without descriptions
Visual Example
cursor2claude transforms your Cursor rules into a single CLAUDE.md file:
.cursor/rules/ → CLAUDE.md
├── core-rules/ ┌─────────────────────────────────────────────────────┐
│ └── code-quality.mdc │ ## 🌍 Always-Apply Rules │
│ (alwaysApply: true) │ @.cursor/rules/core-rules/code-quality.mdc │
│ │ │
└── tool-rules/ │ ## 🤖 Agent-Selected Rules │
├── git-commit-assistant.mdc │ @.cursor/rules/tool-rules/git-commit-assistant.mdc │
│ (agent-selected) │ @.cursor/rules/tool-rules/task-list-management.mdc │
└── task-list-management.mdc │ │
(agent-selected) │ │
└─────────────────────────────────────────────────────┘
🛠 Tech Stack
| Tool | Purpose |
|---|---|
| Node 22+ (TypeScript 5) | Runtime & language |
| Commander | CLI surface |
| yaml | Robust front‑matter parsing |
| chalk | Colourised logs |
| Jest 30 | Unit tests |
| pnpm | Package manager |
| ESLint 9 + Prettier 3 | Code quality |
More Configs
Claude Code System Prompts
Curated CLAUDE.md system prompt variations for different coding styles and strictness levels — conservative, balanced, and aggressive modes with detailed trade-off notes.
Awesome CLAUDE.md
A curated collection of CLAUDE.md configuration files from real projects — monorepos, SaaS apps, open-source libraries, and enterprise codebases.
Claude Codex Settings
Sensible default Claude Code configuration focused on Python and ML projects — includes rules for type hints, docstrings, pytest patterns, and data science conventions.