How Claude Code and Cursor differ
Cursor is built by Anysphere. It is an IDE: autocomplete, chat and an agent inside the editor window, with rules in .cursor/rules.
Claude Code is built by Anthropic. Its home is the terminal, with extensions for VS Code and JetBrains, a desktop app and a web version. The Claude Code docs even link an install of their extension for Cursor, so you can run the Anthropic agent inside the Anysphere editor.
So the real question is usually where you spend your day, terminal or editor, and which rule files you want to keep in the repo.
Comparison table
FeatureClaude CodeCursorProject rulesCLAUDE.md, .claude/rules/*.md with paths.cursor/rules/*.mdc with description, globs, alwaysApply; AGENTS.md; legacy .cursorrulesAGENTS.mdsince v2.1.277, when no CLAUDE.md existsalways, including nested files in subfoldersSkills.claude/skills/, ~/.claude/skills/.agents/skills/, .cursor/skills/, also reads .claude/skills/ and .codex/skills/Subagents.claude/agents/*.md.cursor/agents/, also reads .claude/agents/ and .codex/agents/Hookssettings.json, 33 events.cursor/hooks.json or ~/.cursor/hooks.json; agent, Tab and workspaceOpen eventsMCP.mcp.json, ${VAR} interpolation.cursor/mcp.json, ${env:NAME} interpolation; same mcpServers keyPluginsmarketplaces via /plugin marketplace addCustomize → From GitHub Repository, requires .cursor-plugin/marketplace.jsonSlash commandsmerged into skills/migrate-to-skills (Cursor 2.4+) turns commands and rules into skillsSources: Cursor rules, Cursor skills, Cursor subagents, Cursor hooks, Claude Code skills.
One set of files for both tools
Compatibility runs one way, and that is the key fact. Cursor finds skills in .claude/skills and subagents in .claude/agents on its own. Claude Code knows nothing about .cursor/rules.
A layout that works when half the team is in Cursor and half in the terminal:
- shared rules in
AGENTS.md, with a single@AGENTS.mdline inCLAUDE.md; - skills in
.claude/skills, which both tools load; - subagents in
.claude/agents; on a name clash Cursor prefers its own.cursor/agents; - path-scoped rules need two copies,
pathsfor Claude Code andglobsin.mdcfor Cursor, or a converter.
One trap when moving older projects: the current Cursor docs require the .mdc extension and ignore .md files in .cursor/rules. The legacy .cursorrules is no longer mentioned on the rules page at all. If a rule silently does nothing, check the extension first. Frontmatter fields and the four rule modes are covered in Cursor rules and .mdc.
MCP configs look alike but are not identical: the mcpServers key matches, the environment variable syntax does not. Copying .mcp.json to .cursor/mcp.json as is only works for servers without secrets. More in how to add an MCP server.
Hooks: who has more
Cursor hooks sit closer to the editor: beforeShellExecution, beforeMCPExecution, beforeReadFile, afterFileEdit, plus separate hooks for Tab completion. Claude Code has 33 events and five handler types, including prompt and agent handlers where a model makes the call. The file formats are incompatible, so porting is manual. See Claude Code hooks for the event list.
Which one fits you
If you read and edit code yourself and want completions and inline diffs, Cursor is the better home. If you describe the task in words and expect the agent to walk the repo, run tests and commit, Claude Code is more comfortable, and it runs headless in CI with claude -p.
Our take: for a mixed team the answer is both, with shared files in .claude/skills and AGENTS.md.
Collections: Cursor rules, MCP servers for Cursor, Claude Code skills.