clauding.dev

Cursor to Claude Code

The CLI-First Agent Workflow

For developers who already ship with AI - and want more control.

Introduction

What We'll Cover

You already know AI-assisted coding. This workshop covers what the CLI unlocks beyond the IDE.

🧠 The Mental Shift

IDE-first vs agent-first thinking

🔧 Configuration

CLAUDE.md, permissions, project setup

🤖 Multi-Agent

Subagents, custom agents, agent teams

🔌 Extensibility

Skills, hooks, MCP servers

🚀 Automation

Headless mode, CI/CD, pipelines

📋 Migration Map

Cursor concept → Claude Code equivalent

The Shift

IDE-First vs Agent-First

Cursor wraps AI around your editor. Claude Code gives the AI a terminal and lets it work.

Cursor: You Drive

You open files, position cursor, invoke AI inline. The AI assists within your editor's context.

  • Tab completions as you type
  • Inline edits on selection
  • Composer for multi-file (you guide it)

Claude Code: It Drives

You describe the outcome. The agent reads files, runs commands, makes edits, tests, and iterates.

  • Autonomous multi-step execution
  • Self-correcting loops
  • Parallel agent delegation

The key insight: You stop being a typist with AI assist. You become a technical lead directing agents.

The Shift

What Translates

Good news - many Cursor concepts have direct equivalents.

Cursor Claude Code
.cursorrules CLAUDE.md (more powerful - hierarchical)
Composer Natural language prompts in the terminal
@files in chat @files and @directories - same syntax
Agent mode Default behavior - always agentic
Model picker Alt+P or /model
Apply to file Automatic - Claude edits files directly

Your .cursorrules knowledge transfers. Same idea, but CLAUDE.md supports a global → project → directory hierarchy.

The Shift

What's Genuinely New

Features that have no Cursor equivalent. This is where it gets interesting.

🤖 Subagents

Spawn parallel agents with their own context windows. Research while implementing.

👥 Agent Teams

Multiple agents collaborating via shared task lists and direct messaging. New with Opus 4.6.

🪝 Hooks

Lifecycle events that trigger your scripts. Auto-lint on edit, block dangerous commands, log everything.

🎓 Skills

Packaged expertise that Claude loads automatically when relevant. Hot-reloaded, shareable.

🔌 MCP Servers

Connect to databases, APIs, browsers, and any external tool through an open protocol.

🚀 Headless Mode

Run Claude in CI/CD pipelines, cron jobs, and shell scripts. No human in the loop.

Getting Productive

Setup in 60 Seconds

Install

curl -fsSL https://claude.ai/install.sh | bash # or: brew install claude-code # or: npm install -g @anthropic-ai/claude-code

First Session

cd your-project claude # starts interactive session /init # generates CLAUDE.md from your codebase

Your First Real Prompt

"Add input validation to the signup form. Include email format check and password strength. Write tests."

That's it. Claude reads your codebase, makes the changes, runs the tests, and fixes failures. No file selection needed.

Getting Productive

CLAUDE.md - Your .cursorrules, Evolved

Not just a single file. A hierarchy that Claude reads at session start.

~/.claude/CLAUDE.md # Global - all projects CLAUDE.md # Project root - team conventions src/api/CLAUDE.md # Directory - auto-loaded when working here .claude/MEMORY.md # Private per-user memory (gitignored)

What Goes In It

Build & Test Commands

npm run test, npm run lint - so Claude can verify its own work.

Architecture Decisions

Patterns, conventions, and "never do X" rules. Like .cursorrules but version-controlled.

Pro tip: Tell Claude "update CLAUDE.md with this convention" and it maintains the file itself. Use /init to bootstrap.

Getting Productive

Permission Modes

In Cursor, you approve each edit inline. Claude Code gives you three modes.

✏️ Edit Mode (Default)

Claude asks before each file edit and command. You review diffs inline. Like Cursor's apply flow.

✅ Auto-Accept Mode

File edits auto-approved. Commands still need approval. For when you trust the direction.

📋 Plan Mode

Read-only exploration. Claude researches but can't modify anything. Perfect for architecture review.

⚡ Granular Permissions

In settings.json, whitelist specific tools like Bash(npm test:*). Surgical control.

Shift + Tab
Cycle between modes
Shift+Tab ×2
Jump to Plan Mode
Getting Productive

Shortcuts That Matter

Cursor has Cmd+K and Cmd+L. Here's the Claude Code equivalent muscle memory.

! command
Run bash instantly (no tokens used)
Esc Esc
Rewind - undo code + conversation
@ filename
Reference file (like Cursor's @)
Alt + P
Switch model (Haiku/Sonnet/Opus)
Ctrl + R
Search prompt history
Ctrl + B
Background current task
Ctrl + O
Toggle verbose output
Alt + T
Toggle extended thinking

The big one: ! prefix runs commands without going through the AI. Check git status, run tests, peek at files - zero token cost.

Power Features

Plan Mode & Extended Thinking

Cursor has no equivalent. This is how you tackle complex architecture before writing code.

📋 Plan Mode

Press Shift+Tab twice. Claude explores your codebase in read-only mode, then presents a plan for approval before any edits.

"How should we refactor the auth module to support OAuth2?" → Claude reads 30 files, maps dependencies, proposes a plan → You approve or adjust → Switch to Edit mode to execute

🧠 Thinking Levels

Control how deeply Claude reasons before responding. Four levels of effort.

Toggle: Alt+T

Trigger words:

"think" → standard reasoning

"think harder" → extended

"ultrathink" → max (32k tokens)

Power Features

Context Window Mastery

Cursor handles context silently. In Claude Code, you manage it - and that's a superpower.

/context

See exactly where your tokens go. System prompts, CLAUDE.md, skills, conversation - all broken down with a visual grid.

/compact

Compress conversation to reclaim context. Add focus: /compact Focus on the auth refactor

The Pyramid Pattern

Start broad (explore), narrow focus (implement), compact when needed, repeat. Context auto-compacts at ~95% capacity.

With Opus 4.6

1M token context window in beta. 128K output tokens. Claude handles long sessions by automatically compacting older context while preserving key information.

Power Features

Subagents

No Cursor equivalent. Spawn specialized agents that work in parallel with their own context.

🔍 Explore Agent

Fast, read-only codebase exploration using Haiku. Searches files without consuming your main context.

📋 Plan Agent

Dedicated research for planning mode. Reads code and returns findings to the main agent.

🛠️ General-Purpose

Full tool access in a separate context window. For complex multi-step operations.

💻 Bash Agent

Terminal commands in isolated context. Run builds, tests, or system operations separately.

Why it matters: Research in one agent, implement in another. No context pollution. Parallel execution. This is the "hire a team" moment.

Power Features

Custom Agents

Build your own specialized agents. Drop a markdown file, get a domain expert.

# .claude/agents/code-reviewer.md --- name: code-reviewer description: Reviews code for quality and best practices tools: Read, Glob, Grep model: sonnet memory: project --- You are a senior code reviewer. Analyze code for: - Logic errors and edge cases - Security vulnerabilities - Performance issues - Convention violations per CLAUDE.md

Key Options

tools
Restrict which tools the agent can use
model
Choose haiku/sonnet/opus per agent
memory
Persistent memory across sessions
maxTurns
Limit agent iterations
Power Features

Agent Teams

New with Opus 4.6. Multiple Claude Code instances collaborating on one project.

👑 Team Lead

Your main session. Spawns teammates, assigns tasks, coordinates. Use Shift+Tab for delegate-only mode.

👥 Teammates

Independent agents with their own context. Can message each other directly - not just report to lead.

📋 Shared Task List

Tasks with dependency tracking. Teammates self-claim the next unblocked task when done.

📬 Mailbox

Direct messaging between any agents. Cross-layer coordination without bottlenecks.

# Enable in settings { "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" } } # Display: in-process (same terminal) or tmux (split panes) { "teammateMode": "tmux" }

Best for: 2-5 teammates, 5-6 tasks each. Think frontend + backend + tests in parallel.

Extensibility

Skills System

Like VS Code extensions, but for your AI agent. Packaged expertise that auto-loads when needed.

# .claude/skills/deploy/SKILL.md --- name: deploy description: Deploy to production with safety checks allowed-tools: Read, Grep, Bash --- Before deploying: 1. Run the full test suite 2. Check for uncommitted changes 3. Verify the branch is up to date ...

How Skills Work

Auto-Discovery

Claude reads skill descriptions and loads them automatically when your prompt matches. No manual invocation needed.

Hot Reload

Edit a skill mid-session - changes take effect immediately. No restart required (v2.1+).

Community skills: Install from the public skill repo or create your own. Skills can include templates, examples, and reference files.

Extensibility

Lifecycle Hooks

Run your scripts when Claude does things. Three hook types: command, prompt, and agent.

Event When Can Block?
PreToolUse Before any tool runs Yes - allow/deny/ask
PostToolUse After tool succeeds No - feedback only
Stop Claude finishes responding Yes - force continue
TaskCompleted Agent marks task done Yes - quality gate
SessionStart Session begins No

Real Examples

# Auto-format after every file edit PostToolUse (Edit|Write) → prettier --write $file # Block dangerous commands PreToolUse (Bash) → reject if contains "rm -rf" # Run tests after Claude says it's done Stop → npm test → force continue if failing
Extensibility

MCP Servers

Model Context Protocol - an open standard for connecting AI to external tools. Like APIs, but for agents.

# .mcp.json in project root { "mcpServers": { "postgres": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"] }, "memory": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-memory"] } } }

What MCP Unlocks

🗄️ Databases

Query Postgres, SQLite, or any DB directly. Claude writes and runs queries.

🌐 Browser

Navigate pages, fill forms, read DOM. Debug frontend issues live.

📊 APIs

Connect to Slack, GitHub, Jira, or any service. Claude acts on your behalf.

🧠 Memory

Persistent knowledge graphs. Claude remembers across sessions via MCP.

Reference MCP tools with @mcp:server-name in prompts. Cursor has no equivalent.

Automation

Headless Mode & CI/CD

This is the ultimate "no Cursor equivalent." Run Claude without a human in the loop.

# One-shot commands claude -p "Fix all lint errors in src/" # Pipe output to other tools claude -p "Generate API docs" --output-format json | jq . # In GitHub Actions claude -p "Review this PR for security issues" \ --allowedTools Read,Grep,Glob \ --max-turns 20

CI/CD Integration

GitHub Actions

Auto-review PRs, fix lint errors, generate changelogs. Use claude-code-action for native integration.

Background Agents

Delegate to cloud with & syntax. Long-running tasks execute asynchronously while you keep working.

The vision: Claude doesn't just help you write code. It reviews PRs, maintains docs, monitors tests, and fixes regressions - all headlessly.

Automation

Sessions, Checkpoints & Safety

Cursor doesn't persist sessions. Claude Code treats every conversation as resumable work.

💾 Resume Anywhere

claude -c resumes last session. claude --resume opens a picker. Sessions persist 30 days.

🔀 Session Forking

Fork a session into a new branch. Try something different without losing the original path.

⏪ Checkpoints

Every edit is checkpointed. Press EscEsc to rewind both code and conversation. Three restore options.

🌐 Teleport

/teleport moves a session between terminal, desktop app, and web IDE. Start on laptop, continue on desktop.

The safety net: EscEsc is your undo button for everything. Cursor has Cmd+Z for individual files. Claude Code rewinds the entire agent state.

Reference

Migration Cheat Sheet

Cursor → Claude Code

.cursorrules → CLAUDE.md
Cmd+K → just type a prompt
Cmd+L → just type a prompt
Composer → natural language
@file → @file
Agent mode → default

Essential Shortcuts

! bash (free)
Esc×2 rewind
Shift+Tab mode cycle
Alt+P model switch
Ctrl+B background
@ mention files

No Cursor Equivalent

Subagents
Agent teams
Hooks system
Skills (auto-load)
MCP servers
Headless / CI mode

Key Commands

/init, /compact, /context, /model, /resume, /rewind, /teleport, /hooks, /agents, /permissions

CLI Flags

-p (headless), -c (continue), --resume, --from-pr, --output-format json

Wrap Up

Your Upgraded Workflow

You came from Cursor knowing AI-assisted coding. Now you have agent-directed development - parallel agents, lifecycle hooks, composable skills, and headless automation.

Week 1

Master CLAUDE.md, permission modes, ! and EscEsc

Week 2

Add subagents, custom agents, and your first skill

Week 3

Set up hooks, MCP servers, and headless pipelines

Week 4

Agent teams. You're now directing a dev team, not typing code.

Want hands-on training? We run workshops on Claude Code and agent development.
Get in touch →

Many humans use both Cursor and Claude Code. They're complementary, not competing.

1 / 21
Navigate M Menu