Heidelberg AICurriculum
Track 13 · Advanced
13.2.3

Cursor

VS Code reimagined with an AI agent that writes and runs your code

7 lessons 2026-08-06 AI-generated

1Overview

A fork of VS Code where AI isn't bolted on as an extension — it's built into the editor itself, from inline suggestions to a full autonomous agent mode.

Cursor is a code editor built on VS Code — familiar if you've used VS Code, but AI is woven into every layer. It autocompletes as you type, answers questions about your own files in a chat sidebar, and in Agent mode reads your project, writes changes across multiple files, runs them, and iterates until it works. → University students get a full year of Cursor Pro free via cursor.com/students.

1.2After this chapter you can
Use Agent mode to read a project, write multi-file changes, and run them
Ask the chat sidebar plain-English questions about your own files
Pick the right frontier model per task — Claude, GPT, or Gemini
1.3Best for

Describing what you want in plain English instead of writing syntax from memory — "load this CSV, plot a heatmap, flag rows with >20% missing values" becomes a working script.

1.4Watch out

The free Hobby plan hits its request limits fast; heavy use needs the $20/mo Pro plan. Sends code to cloud AI providers — check institutional data policies for sensitive research data.

1.5Free vs paid

Hobby (free) hits its usage limits fast under real work; each paid tier mainly buys more headroom, not new features. Your code also goes to outside AI providers on any tier, since it's cloud-based.

2Lessons 7

2.1 Install Cursor and open its chat sidebar

Open Cursor and display the built‑in chat pane for coding assistance

  1. Visit cursor.com/download in a web browser and click the appropriate Download button for your operating system
  2. Run the installer you saved and follow the on‑screen prompts to finish installation
  3. Launch Cursor from your applications menu
  4. Open a folder with File → Open Folder… or create a new file
  5. Click the chat icon in the activity bar to open the chat pane
  • You'll see The editor UI appears with a chat panel on the right side of the window
  • Takeaway The AI‑enabled editor is ready for instant code assistance
  • Check Which sequence of actions lets you install Cursor, open a project folder and then reveal the chat pane for AI help?

2.2 Explore your project with Cursor’s AI Agent

The Agent window that can answer questions about the files in a opened folder.

You will be able to ask the Agent to locate definitions, trace call paths, and list key modules in your codebase.

  1. Open a local repository folder in Cursor.
  2. Press Cmd+K to open the chat sidebar if it is not already visible.
  3. In the chat input type “@agent show me the entry point of this project”.
  4. Read the Agent’s response and verify that the file path it mentions exists in the Explorer panel.
  • You'll see The Agent returns a file name with line numbers, and clicking the link opens that file at the indicated location.
  • Takeaway AI agents can quickly surface structural information from large codebases without manual searching.

2.3 Activate a free year of Cursor Pro

Activate a free year of Cursor Pro using a verified student account

  1. In Cursor, click Sign Out to log out of any existing account
  2. Open a browser and go to cursor.com/students
  3. Enter your .edu email address in the field and press Submit
  4. Open the verification email you receive and click its Verify link
  5. Log back into Cursor with the newly created student credentials
  • You'll see The dashboard shows a Pro badge and indicates that free usage credits are available for the year
  • Takeaway Verifying student status unlocks premium AI features at no cost
  • Check What steps do you follow to verify your .edu email and obtain the Pro badge inside Cursor?

2.4 Plan a new feature using Cursor’s Plan mode

Plan mode, where the Agent asks clarifying questions and produces a step‑by‑step implementation plan.

You will generate a concrete development plan for adding a “search” endpoint to an existing API.

  1. In the chat sidebar type “@agent I want to add a search endpoint that returns JSON results”.
  2. When the Agent asks follow‑up questions, answer them to clarify language (e.g., TypeScript) and location (e.g., src/api).
  3. Accept the generated plan when the Agent presents it.
  4. Copy the plan into a new Markdown file in the project for reference.
  • You'll see The Agent outputs an ordered list of tasks with file names, function signatures, and test suggestions.
  • Takeaway Plan mode turns high‑level ideas into actionable, scoped work items that can be handed to the agent for execution.

2.5 Refactor a React page into typed sub‑components

Transform a monolithic React file into separate typed components and a context provider while keeping the UI unchanged

  1. Open the project folder in Explorer
  2. Show the Agent sidebar by clicking the Agent icon
  3. Enter the refactoring request in the Prompt box and submit
  4. Examine the generated plan and click Approve
  5. Allow the Agent to create sub‑components, add typings, and extract a context provider
  6. Open Terminal, run npm start, and confirm the UI looks unchanged
  • You'll see The original file shrinks, new .tsx component files appear in the explorer, and the app renders exactly as before
  • Takeaway AI agents can automate large‑scale refactoring into modular, typed code with minimal effort
  • Check Which steps involve interacting with the Agent sidebar to request, approve, and let the AI generate new typed sub‑components for your React project?

2.6 Let the Agent implement the planned feature

Agent execution, where the AI writes code across multiple files based on a plan.

You will have a new endpoint file created, route registration updated, and a passing test added automatically by the Agent.

  1. Open the Markdown plan you saved in Lesson 2.
  2. Select all text of the plan and type “@agent execute this plan”.
  3. Confirm any preview the Agent shows before it writes files.
  4. When the Agent finishes, run the built‑in test command (Ctrl+Shift+ then npm test`).
  5. Observe that the new tests pass and the endpoint returns expected JSON.
  • You'll see New source files appear in the Explorer, the test runner reports all green, and a console log shows the endpoint response.
  • Takeaway Cursor’s agent can turn a written plan into real code changes and verify them with automated tests.

2.7 Add a custom skill to extend Cursor’s capabilities

A Skill, defined in the Docs under “Customize → Skills”, that lets you invoke reusable commands from the chat.

You will install a sample skill and use it to generate boilerplate for a React component with TypeScript types.

  1. Open the Docs sidebar (Cmd+K then type “skills”).
  2. Find the example skill named “component‑boilerplate” and click “Add”.
  3. Return to the chat sidebar and type “/component‑boilerplate Button.tsx”.
  4. Accept the generated file and open it to see a ready‑to‑use component skeleton.
  • You'll see A new Button.tsx file appears with imports, props interface, and a functional component stub.
  • Takeaway Skills let you package common patterns as one‑click actions, speeding up repetitive development tasks.

3You’ll know it worked 18 checkable outcomes in this chapter

  • The original page loads with the same UI, but its code is split into typed sub-components and a context provider
  • Discrepancies beyond $0.01 trigger an email to ar-team@company.com
  • Cursor shows a custom model entry named "GLM 5.2" and uses it for chat completions
  • The loop stops after the score reaches four or five, or after a set number of attempts
  • A suggestion appears inline while typing and is inserted after pressing Tab
  • Agent responses include references to the exact file names you mentioned
  • Billing page lists "Pro" as the active subscription and shows $20 remaining API credit
  • Account dashboard shows "Ultra" as active and $400 of remaining usage

18 outcomes in all — one per recipe below.

4FAQ, Tips & How-to 41

one problem, one solution, one action

Internal tools & ops1

How-to Cursor Founder +1

Huge monolithic React page blocks reuse

The page becomes composable and testable; two new features are added the same afternoon by reusing the extracted components.

~8 min · low code AI-generated

Dashboards & analytics1

How-to Cursor Finance +1

Slow dashboard caused by ORM N + 1 queries

Dashboard load time drops from 4.2 s to 0.6 s; the migration is production-ready with rollback included.

~8 min · low code AI-generated

Research & data tools1

How-to Cursor Finance +1

Manual spreadsheet formulas for billing reconciliation

A reconciliation step that previously required a 200-line manual spreadsheet formula is replaced by a reproducible, version-controlled script; discrepancies are caught the same day they arise.

~8 min · low code AI-generated
How-to Cursor Everyone

Tracking team performance on Cursor helps prioritize development focus

WorldofAI ↗ Summary → AI-generated
How-to Cursor Everyone

Cursor API key swap for GLM 5.2

Configure Cursor to use GLM 5.2 by swapping the OpenAI key for a Z AI key and overriding the endpoint

Greg Isenberg ↗ Summary → AI-generated
How-to Cursor Everyone

Using a single coding environment ensures all models run under the same hardware and file-system constraints

Tech With Tim ↗ Summary → AI-generated
How-to Cursor Everyone

Want to use MiniMax M3 in your code editor

You can use MiniMax M3 with Cursor by pointing to its API endpoint and registering a custom model name

Tech With Tim ↗ Summary → AI-generated
How-to Cursor Everyone

Want UI clicks to run ImageKit transforms

Configure Cursor to call ImageKit's API without writing code

Tech With Tim ↗ Summary → AI-generated
How-to Cursor Everyone

Need to speak your project specs

Use voice input to generate a detailed prompt for Claude

Tech With Tim ↗ Summary → AI-generated
How-to Cursor Everyone

Need an architecture document

Ask Claude to produce a structured architecture document

Tech With Tim ↗ Summary → AI-generated
How-to Cursor Everyone

Want longer chats without cutting off text

Increase the context size to keep longer conversations

Tech With Tim ↗ Summary → AI-generated
How-to Cursor Everyone

Need a new GitHub repo that enforces commit rules automatically

Let Cursor manage GitHub integration and enforce commit policies

Tech With Tim ↗ Summary → AI-generated
How-to Cursor Everyone

AI pipeline keeps failing

Use error messages as prompts for Claude to fix the pipeline

Tech With Tim ↗ Summary → AI-generated
How-to Cursor Everyone

Code gets low review scores

See how Cursor can repeatedly pull a review score, fix code, and push until the target is reached

Greg Isenberg ↗ Summary → AI-generated
How-to Cursor Everyone

My code is scattered and I need the AI to see it

Opening a folder lets the AI see your codebase and generate files in the right place

**Cursor is VS Code with AI built in**: describe a change in the chat sidebar and it writes the code, then holds it in a reviewable diff — you accept before anything is saved. Credit: cursor.com/docs ↗
The **Hobby** plan is **free with no credit card**, including **limited Agent requests and limited Tab completions** — enough to follow this course's first lessons. Lesson → AI-generated
How-to Cursor Everyone

You retain control by inspecting the suggested modifications before they become part of your project

Lesson → AI-generated
How-to Cursor Everyone

You can type faster by letting Cursor suggest whole lines or functions as you write code

Cursor's three panes — sidebar, file-aware chat, and a reviewable diff. Credit: cursor.com ↗
~8 min · low code Both Tab completion and chat draw on your plan's included usage. On **Hobby** these are **limited**; **Pro** ($20/mo) adds generous included usage so you rarely think about it. Lesson → AI-generated
How-to Cursor Everyone

Press Tab to accept an autocomplete suggestion

Pressing Tab confirms the autocomplete suggestion, inserting it instantly

Lesson → AI-generated
How-to Cursor Everyone

Use the chat to understand code snippets and request concise modifications rather than large rewrites

Lesson → AI-generated
How-to Cursor Everyone

Need to edit many files at once

Activating Agent mode lets the AI read your project and write changes across many files automatically

**Agent mode** in the chat sidebar reads your project and writes changes across multiple files, then stops at a reviewable diff — accept or reject before anything touches your folder. Credit: cursor.com/docs ↗
Agent runs consume included usage by request; **Hobby** has **limited Agent requests**, so spend them on real features. **Pro** includes generous usage for Agent and Composer. Lesson → AI-generated
How-to Cursor Everyone

Need a script to clean a gene CSV and plot a clustered heatmap

Providing a clear English description to the agent yields a ready-to-run script spread over the necessary files

~8 min · low code Lesson → AI-generated
How-to Cursor Everyone

Knowing your plan's request quota helps you allocate Agent runs to high-value features

Lesson → AI-generated
How-to Cursor Everyone

Not sure which AI model fits your task

Enabling Auto lets Cursor automatically pick the most suitable model for each task

The model picker: switch between frontier models per task, with cost and context-window details shown inline. Credit: youtube.com/@cursor_ai ↗
Model selection directly affects spend: a pricier model eats included usage faster. On **Pro** ($20/mo) you get generous included usage for Auto and Composer to absorb everyday switching. Lesson → AI-generated
How-to Cursor Everyone

Choosing a more capable (heavier) model improves answer quality on difficult tasks

Lesson → AI-generated
How-to Cursor Everyone

Different models have different API costs, so picking a model directly influences how fast you consume included usage

Lesson → AI-generated
How-to Cursor Everyone

The agent can answer using actual project files instead of guessing

Beyond your own files, **MCPs** connect the agent to external tools and data — here it calls a connected Postgres server's `list_schemas` and works from the real result, not a guess. Credit: cursor.com/docs ↗
Context features themselves are about quality, not extra fees; the usual usage metering applies to the model requests they drive. **Teams** plans add Bugbot agentic code reviews and shared-context cloud agents. Lesson → AI-generated
How-to Cursor Everyone

Project knowledge disappears after each chat

Shared-context cloud agents let multiple users work with the same project knowledge

Lesson → AI-generated
How-to Cursor Everyone

Need a free AI assistant with limited requests

You can start using Cursor without paying by selecting the Hobby tier

**Cursor's pricing page** (Monthly billing) — Hobby is free, Individual/Pro is $20/mo (Pro+/Ultra step up from there), Teams is $40/user/mo, Enterprise is custom.
  1. **Hobby** — free tier to start.
  2. **Pro** — $20/mo (Pro+ $60, Ultra $200).
  3. **Teams** — $40/user/mo; **Enterprise** — custom.
Credit: cursor.com ↗
Free to start on **Hobby**; **$20/mo** for **Pro**; **free for one year** for eligible students. Because different models have different API costs, model choice is what governs how fast included usage is spent. Lesson → AI-generated
How-to Cursor Everyone

Cursor Pro plan

Upgrading to Pro gives you $20 of monthly API usage and higher limits for Auto and Composer

Lesson → AI-generated
How-to Cursor Everyone

Pro+ offers more generous monthly credits for heavier users at a higher price

Lesson → AI-generated
How-to Cursor Everyone

Cursor Ultra tier

Ultra delivers the highest monthly credit for power users or teams needing large API budgets

Lesson → AI-generated
How-to Cursor Everyone

Want a single bill for all users

Teams lets multiple users share billing, a marketplace, and shared-context agents

Lesson → AI-generated
How-to Cursor Everyone

Want a full year of premium features for free

Eligible students receive a full year of Pro features at no cost

Lesson → AI-generated
FAQ Cursor Everyone

What is Cursor and what is it for?

Cursor is a code editor built on VS Code with AI woven into every layer, made by Anysphere. If you have ever used VS Code the interface is immediately familiar, but as you type it autocompletes whole lines and functions, a chat sidebar answers questions about your own files in plain English, and Agent mode reads your project, writes changes across multiple files, runs them, and iterates until they work. It is for writing and building software without needing syntax from memory: you describe what you want, review the proposed change, and accept it. It understands pandas, NumPy, matplotlib, and Jupyter notebooks natively, so it suits data and analysis work as well as app building.

Cursor ↗ AI-generated
FAQ Cursor Everyone

Can I keep my VS Code extensions and settings in Cursor?

Yes. Cursor is a fork of VS Code, so the layout, shortcuts, and extension ecosystem are the same, and the apps you already know carry over. That includes the wider VS Code extension marketplace and native Jupyter notebook support, so you can keep using your familiar tools alongside Cursor's AI features. On paid plans you can also extend the agent with MCPs, skills, and hooks: MCPs connect the agent to external tools and data sources, while skills and hooks shape how it works. The practical upshot is that you do not have to abandon your existing editor setup to adopt Cursor; you layer the AI on top of it.

Cursor ↗ AI-generated
FAQ Cursor Everyone

What is Tab completion and how do I use it?

Tab is Cursor's AI autocomplete. As you type it suggests code ahead of your cursor as grayed-out text, based on your recent edits, the surrounding code, and any linter errors. Press Tab to accept a suggestion, or keep typing to ignore it. It is more capable than ordinary autocomplete: it can change multiple lines at once, add missing import statements, and suggest coordinated edits across related code. After you accept a suggestion, pressing Tab again can predict your next edit location and jump you there. You can snooze or configure it from the Tab status indicator in the bottom-right corner, under Cursor Settings then Tab.

Cursor ↗ AI-generated
FAQ Cursor Everyone

What is Agent mode and when should I use it?

Agent mode is Cursor's autonomous mode in the chat sidebar. Instead of giving you a single answer, the agent reads your project, plans the steps, writes changes across multiple files, can run terminal commands with your approval, and iterates on errors until the task works. You use it for whole features rather than tiny edits, for example loading a CSV, cleaning it, and producing a plotted heatmap from one description. Always review the diff it proposes before accepting. Keep the request specific and small-scoped, naming the file, columns, and exact rules, because vague instructions let the agent drift while precise ones keep it on track.

Cursor ↗ AI-generated
FAQ Cursor Everyone

Which AI models can Cursor use, and does the choice matter?

Cursor is not tied to a single model. The model picker in the chat and Agent bar gives you access to the major frontier models from Anthropic, OpenAI, and Google, switchable per task, and an Auto setting that lets Cursor pick for you. The choice matters for both quality and cost: reach for a heavier model for tricky multi-file reasoning and a faster one for routine edits. Because different models have different underlying API costs, your model choice is also a cost lever, governing how quickly your plan's included usage is consumed. Frontier-model access is part of the paid plans rather than the free Hobby tier.

Cursor ↗ AI-generated
FAQ Cursor Everyone

How do I fix an error in my code with Cursor?

Run your code, and when it breaks, copy the error message or traceback and paste it straight into the chat. Cursor diagnoses the cause from your actual code rather than a generic guess and explains it in plain English. In Agent mode it can go further: it can run the code itself, see the failure, and iterate, installing a missing package, fixing a path, or correcting logic and re-running until the script succeeds. Review each fix before accepting it. To spend fewer Agent requests, batch the error and the goal into one message, for example pasting the traceback and adding make the script run end to end.

Cursor ↗ AI-generated
How-to Cursor Everyone

Want a coding environment ready to go

Get Cursor installed on your machine and ready to use

Official docs / Installation ↗ AI-generated
How-to Cursor Everyone

Student with a .edu email wants a free year of the AI coding tool

Students can receive a free one-year subscription to Cursor Pro by verifying their university email address

Official student offer page ↗ AI-generated

The same set on /recipes, filtered by tool and role.

5Videos 3

6FAQ 6

What is Cursor and what is it for?

Cursor is a code editor built on VS Code with AI woven into every layer, made by Anysphere. If you have ever used VS Code the interface is immediately familiar, but as you type it autocompletes whole lines and functions, a chat sidebar answers questions about your own files in plain English, and Agent mode reads your project, writes changes across multiple files, runs them, and iterates until they work. It is for writing and building software without needing syntax from memory: you describe what you want, review the proposed change, and accept it. It understands pandas, NumPy, matplotlib, and Jupyter notebooks natively, so it suits data and analysis work as well as app building.

Can I keep my VS Code extensions and settings in Cursor?

Yes. Cursor is a fork of VS Code, so the layout, shortcuts, and extension ecosystem are the same, and the apps you already know carry over. That includes the wider VS Code extension marketplace and native Jupyter notebook support, so you can keep using your familiar tools alongside Cursor's AI features. On paid plans you can also extend the agent with MCPs, skills, and hooks: MCPs connect the agent to external tools and data sources, while skills and hooks shape how it works. The practical upshot is that you do not have to abandon your existing editor setup to adopt Cursor; you layer the AI on top of it.

What is Tab completion and how do I use it?

Tab is Cursor's AI autocomplete. As you type it suggests code ahead of your cursor as grayed-out text, based on your recent edits, the surrounding code, and any linter errors. Press Tab to accept a suggestion, or keep typing to ignore it. It is more capable than ordinary autocomplete: it can change multiple lines at once, add missing import statements, and suggest coordinated edits across related code. After you accept a suggestion, pressing Tab again can predict your next edit location and jump you there. You can snooze or configure it from the Tab status indicator in the bottom-right corner, under Cursor Settings then Tab.

What is Agent mode and when should I use it?

Agent mode is Cursor's autonomous mode in the chat sidebar. Instead of giving you a single answer, the agent reads your project, plans the steps, writes changes across multiple files, can run terminal commands with your approval, and iterates on errors until the task works. You use it for whole features rather than tiny edits, for example loading a CSV, cleaning it, and producing a plotted heatmap from one description. Always review the diff it proposes before accepting. Keep the request specific and small-scoped, naming the file, columns, and exact rules, because vague instructions let the agent drift while precise ones keep it on track.

Which AI models can Cursor use, and does the choice matter?

Cursor is not tied to a single model. The model picker in the chat and Agent bar gives you access to the major frontier models from Anthropic, OpenAI, and Google, switchable per task, and an Auto setting that lets Cursor pick for you. The choice matters for both quality and cost: reach for a heavier model for tricky multi-file reasoning and a faster one for routine edits. Because different models have different underlying API costs, your model choice is also a cost lever, governing how quickly your plan's included usage is consumed. Frontier-model access is part of the paid plans rather than the free Hobby tier.

How do I fix an error in my code with Cursor?

Run your code, and when it breaks, copy the error message or traceback and paste it straight into the chat. Cursor diagnoses the cause from your actual code rather than a generic guess and explains it in plain English. In Agent mode it can go further: it can run the code itself, see the failure, and iterate, installing a missing package, fixing a path, or correcting logic and re-running until the script succeeds. Review each fix before accepting it. To spend fewer Agent requests, batch the error and the goal into one message, for example pasting the traceback and adding make the script run end to end.

7Glossary 8 terms

Show the 8 terms
Cursor
sns.clustermap
A function from the seaborn visualisation library that draws a heatmap with rows and columns automatically reordered so that similar values cluster together.
utils.py
A Python file named by convention to hold small helper functions shared across multiple scripts in the same project, keeping the main files shorter and easier to read.
Agent mode
A mode where Cursor autonomously reads your project and writes changes across multiple files in one session, rather than answering a single question.
Tab
Cursor's line-by-line code suggestion that appears as you type; press Tab to accept it or keep typing to ignore it.
model picker
The dropdown that lets you switch which model handles a request (Claude, GPT, Gemini, or Auto) on a per-task basis.
diff
The view Cursor shows of what the AI changed in a file; you review it and choose to accept or reject before it is saved.
ModuleNotFoundError
A Python error meaning a required package is not installed; in Agent mode Cursor can detect this and install the missing package automatically.
Auto
The model-picker option that lets Cursor choose the best model for each request automatically, useful for routine edits.

8See also

💬 Discuss this chapter

Ask, share, or report — over on the Heidelberg AI community forum.