Chapter 2

Getting Started with Cursor

Most developers waste their first week with Cursor. They install it, use it like a fancy autocomplete, get frustrated when suggestions miss the mark, and conclude it's overhyped. Then they watch a colleague generate an entire feature with tests in twenty minutes and realize they've been using a Ferrari in first gear.

This chapter eliminates that learning curve. We'll cover setup, essential shortcuts, the critical distinction between Chat and Agent modes, prompt patterns that consistently produce quality output, and ten concrete wins you can achieve in your first week. By the end, you'll be productive immediately—not eventually.

Installation and Initial Configuration

Cursor runs on Windows, macOS, and Linux. Download from cursor.com and install using your platform's standard method.

  • Windows: .exe installer
  • macOS: Drag-and-drop from .dmg
  • Linux: sudo dpkg -i cursor-*.deb

ℹ️
First-Time Setup

  • • Create an account on first launch (includes 14-day Pro trial)
  • • Import VS Code settings if migrating (extensions, themes, keybindings transfer directly)
  • • Enable project indexing immediately for full codebase context
  • • Open your most active project to start (not a toy project)

Essential Shortcuts and Muscle Memory

Cursor's power comes from keeping you in flow. Context switching to menus breaks concentration. These shortcuts eliminate that friction.

Code Completion

  • Tab → Accept AI suggestion
  • Esc → Reject suggestion
  • Ctrl/Cmd + → → Accept next word

Inline Editing

  • Ctrl/Cmd + K → Open inline edit
  • Ctrl/Cmd + Enter → Apply changes
  • Ctrl/Cmd + Backspace → Cancel

Chat and Context

  • Ctrl/Cmd + L → Open chat
  • Ctrl/Cmd + I → Open Composer (Agent)
  • Ctrl/Cmd + Shift + I → Full-screen Composer

Standard IDE Operations

  • Ctrl/Cmd + Shift + P → Command palette
  • Ctrl/Cmd + , → Settings
  • Ctrl/Cmd + B → Toggle sidebar

Context Symbols (the @ operator)

The @ symbol tells Cursor where to focus attention. Think of it as a precision targeting system:

  • @filename → Reference specific file
  • @functionName → Reference specific function
  • @codebase query → Search across entire project
  • @web query → Pull in external documentation

Example: "Refactor @AuthService to use the session pattern from @SessionManager"

Practice Makes Perfect

Spend 30 minutes practicing these shortcuts. Muscle memory matters—when shortcuts become automatic, you stop thinking about the tool and focus on the problem.

Chat Mode Versus Agent Mode: When to Use Each

Cursor offers two primary interaction modes with fundamentally different purposes. Confusing them causes most early frustration.

Chat Mode (Ask Mode)

Read-Only

Understanding, planning, and learning. Explains code, answers questions, explores codebase.

Agent Mode (Composer)

Read-Write

Multi-file edits, runs commands, fixes errors. Your execution partner.

When to use Chat Mode:

  • "Explain how this authentication middleware works"
  • "What's the performance bottleneck in this query?"
  • "Show me all places where UserService is instantiated"
  • "What's the best approach for implementing rate limiting here?"

When to use Agent Mode:

  • "Refactor all controllers to async/await and update related tests"
  • "Implement rate limiting middleware following patterns from @RateLimiter"
  • "Fix this test failure and update snapshots if needed"
  • "Add logging to all API endpoints with request ID tracking"

⚠️
Important Rule of Thumb

Use Chat for clarity, Agent for action.

If you're uncertain what to do, start in Chat. Once you know what needs to happen, switch to Agent.

Writing Prompts That Produce Quality Output

Prompt quality determines output quality. Vague requests produce vague results. Precise prompts produce precise code.

Vague

"Fix this function."

Specific

"Refactor calculateDiscount to use async/await, handle API errors gracefully with retry logic, and add input validation for negative prices."

Be Clear and Specific

Give Cursor actionable requirements. The specific version tells it exactly what to do.

Always Provide Context

Use @ symbols or paste relevant code. Re-establish context explicitly when needed.

Break Down Complex Tasks

Large requests overwhelm AI. Work incrementally—catch problems early.

Iterate and Validate

Always review output. If it goes off track, stop and redirect immediately.

Use .cursorrules to Encode Standards

This file in your project root defines conventions Cursor should always follow:

# Project: E-commerce API

## Tech Stack
- Node.js with Express
- PostgreSQL with TypeORM
- Jest for testing

## Code Standards
- Use async/await, never callbacks
- All database queries must use transactions for writes
- Input validation using Zod schemas
- Error responses follow RFC 7807 format
- API rate limiting: 100 req/min per IP

## Testing Requirements
- Unit test coverage >80%
- Integration tests for all API endpoints
- Mock external services (Stripe, SendGrid)

## Never Do
- Synchronous file operations
- String interpolation in SQL queries
- console.log in production code (use structured logging)
- Hardcoded secrets or credentials

With .cursorrules in place, every Cursor interaction automatically respects these standards.

Ten Quick Wins for Your First Week

Theory matters, but results convince. Here are ten concrete tasks you can accomplish immediately to experience Cursor's value.

1

Generate boilerplate code

Create forms, components, configs in seconds

2

Refactor for readability

Clean up messy code, extract functions, improve naming

3

Explain unknown code

Get plain-English explanations of complex functions

4

Auto-generate unit tests

Comprehensive test suites faster than manual writing

5

Debug faster

Analyze error logs and get specific solutions

6

Write documentation

JSDoc comments, usage examples in minutes

7

Convert languages/frameworks

Translate between Python, Node.js, React, etc.

8

Pull live external info

Fetch current documentation with @web operator

9

Enforce coding standards

Automatic consistency via .cursorrules

10

Build something fun

Complete small project in 10-15 minutes

Common First-Week Mistakes

Mistake 1: Using Cursor like autocomplete

Instead, describe what you need and let Cursor draft the implementation.

Mistake 2: Accepting output without review

AI-generated code is a starting point, never a final product. Always validate.

Mistake 3: Not providing enough context

Use @ symbols religiously to point Cursor at relevant files and patterns.

Mistake 4: Trying to do too much at once

Break large tasks into smaller pieces for better results.

Mistake 5: Ignoring .cursorrules

Set up project standards once to save repeating them in every prompt.

Mistake 6: Not experimenting in Chat first

Explore options in Chat mode before committing to Agent mode changes.

Mistake 7: Forgetting to checkpoint with git

Commit current work before running large refactors.

What "Productive" Looks Like After Week One

By the end of your first week, you should comfortably:

Switch between Chat and Agent modes based on the task
Write specific, context-rich prompts
Use @ symbols to target Cursor's attention
Apply inline edits for quick refactors
Generate and validate tests routinely
Leverage .cursorrules for consistency

The Mental Shift

Most importantly, you should start thinking differently. Instead of "How do I implement this?" you ask "How do I describe what needs to exist?" That mental shift—from implementation to specification—is what separates developers who use Cursor effectively from those who struggle with it.

Ready for the Next Level

The next chapter explores the mindset changes required to thrive in AI-first development: how to trust AI appropriately without over-relying on it, how to use AI as a learning accelerator, and how to maintain your skills while working at a higher level of abstraction.