FA Dev Tools

English中文

claude-vs-cursor

ai/claude-vs-cursor · Updated · Tags: ai


Claude Code vs Cursor — instruction files & skills

How the two tools handle memory/instruction files and skills, and when each one loads.

Colour key: Claude Code Cursor · amber = no direct equivalent in that tool

Quick answers

  • Does Cursor have a CLAUDE.md / CLAUDE.local.md? Not by that name. Cursor's equivalent is .cursor/rules/*.mdc (project) + User Rules in Cursor Settings (user). Cursor also reads AGENTS.md (project root) as a simple always-on instruction file. The legacy .cursorrules file is the old single-file equivalent (deprecated).
  • Does Cursor have skills? Yes — .cursor/skills/<name>/SKILL.md, same model-invoked-on-description mechanism as Claude's .claude/skills/. In this repo, tool-agnostic skills are real dirs in .cursor/skills/ with symlinks from .claude/skills/.

Instruction / memory files

Two Loads columns because the two tools fire on different triggers — read them per tool.

WhatClaude CodeCursorScopeLoads (Claude)Loads (Cursor)
Global user instructions~/.claude/CLAUDE.mdUser Rules (Cursor Settings → Rules; not a file)UserAlwaysAlways
Global user rule files~/.claude/rules/*.md, imported skills~/.cursor/rules/ (if used)UserAlways / on-demand per frontmatterAlways / on-demand per frontmatter
Project instructions./CLAUDE.md or ./.claude/CLAUDE.mdAGENTS.md (root) · legacy .cursorrulesProjectAlwaysAlways
Personal project overrides (gitignored)./CLAUDE.local.md(no direct equivalent — use a gitignored .cursor/rules/*.mdc)Project (local)AlwaysN/A (use a gitignored rule → per its frontmatter)
Always-on rule.claude/rules/*.md without paths: frontmatter.cursor/rules/*.mdc with alwaysApply: trueProjectAlwaysAlways
Path/glob-scoped rule.claude/rules/*.md with paths: frontmatter.cursor/rules/*.mdc with globs:ProjectOn demand — when you Read a matching fileOn demand — when a matching file is attached/in context
Model-decides rule(no exact equivalent; closest is the CLAUDE.md glob table pointing at a rule).cursor/rules/*.mdc with description: only (Agent Requested)ProjectOn demand — only if the glob table points the model at itOn demand — model pulls it in by description relevance
Manual / @-mention ruleListed in CLAUDE.md glob table, read on demand.cursor/rules/*.mdc with no globs/alwaysApply (Manual)ProjectOn demand — when the table/task says to read itOn demand — only when @-mentioned in chat
Nested/subdir instructionsSubdirectory CLAUDE.mdNested .cursor/rules/ in subfoldersProject (sub-tree)On demand — when working in that subtreeOn demand — when a file in that subtree is in context
Imports@path inside any CLAUDE.md/rule (e.g. @RTK.md, @.cursor/rules/foo.mdc)@file.mdc reference inside a ruleEitherInlined with the host fileInlined with the host file

Skills

WhatClaude CodeCursorScopeLoads (Claude)Loads (Cursor)
User skill~/.claude/skills/<name>/SKILL.md~/.cursor/skills/<name>/SKILL.mdUserOn demand — model invokes by description match, or /<name>On demand — model invokes by description match, or /<name>
Project skill<repo>/.claude/skills/<name>/SKILL.md<repo>/.cursor/skills/<name>/SKILL.mdProjectOn demand — model invokes by description match, or /<name>On demand — model invokes by description match, or /<name>
This repo's conventionTool-agnostic skill = real dir in .cursor/skills/, symlinked into .claude/skills/; tool-specific skills stay in their own tool foldersame source dirProjectOn demandOn demand

Skills are never "always loaded" — only their one-line description is indexed; the full SKILL.md body loads when the skill is invoked (by the model matching the description, or the user typing /name).

Load-timing summary

  • Always (every turn/session): Claude ~/.claude/CLAUDE.md, project CLAUDE.md, CLAUDE.local.md, .claude/rules/* without paths: — Cursor: User Rules, AGENTS.md/.cursorrules, alwaysApply: true rules.
  • On demand (when relevant): Claude paths:-scoped .claude/rules, subdir CLAUDE.md, all skills — Cursor: globs: rules, description-only rules, manual rules, subdir rules, all skills.

This repo's dual-file rule pattern (Claude ↔ Cursor bridge)

Every glob-scoped rule lives in two files kept in sync:

  1. .cursor/rules/<name>.mdc — source of truth (body + Cursor globs:/description:).
  2. .claude/rules/<name>.md — thin wrapper carrying only paths: frontmatter + @.cursor/rules/<name>.mdc.

A rule with no globs (manual) gets no .claude wrapper — instead it's listed in the CLAUDE.md glob table as the on-demand index. See CLAUDE.local.md → "When you update a rule, update BOTH sides", and the /sync-rules skill which audits this coverage.

Disclaimer: These documents are personal notes. The information may be incomplete, out of date or wrong, so check it before you rely on it.