Getting Started with Cursor
Getting Started with Cursor êŽë š
I donât love the term âvibe coding,â but I also donât like doing tedious things.
Over the last few months, weâve seen a number of AI-driven development tools. Cursor is probably the most well-known at this point. But big players are starting to come out with their own like OpenAIâs Codex, Anthropicâs Claude Code, Google Gemini CLI, and Amazonâs Kiro.
Think of Cursor as Visual Studio Codeâs ambitious younger cousinâthe one who not only borrows your syntax highlighting but also brings a full brain along for the rideâand is also a fork of its bigger cousin. In fact, if you werenât looking closely, you could be forgiven for confusing it with Visual Studio Code.

I should note that Microsoft has also been racing to add Cursor-like features to Visual Studio Code and a lot of what weâre going to talk about here can also apply to Copilot in Visual Studio Code as well.
Editors note
If you really want to level up with your AI coding skills, you should go from here right to Steveâs course Cursor & Claude Code: Professional AI Setup.
Getting Set Up: The Familiar On-Ramp
If youâve ever installed Visual Studio Code, you already know the drill. Download, install, run. Cursor smooths the landing with a one-click migration from VS Codeâyour extensions, themes, settings, and keybindings slide right over. Suddenly, youâre in a new editor that looks a lot like home but has some wild new tricks up its sleeve.
Once youâre settled, Cursor gives you a few ways to work with it:
- Inline Edit (Cmd/Ctrl+K) â Highlight some code, and then tell Cursor what you want to happen (e.g. âRefactor this function to use async/awaitâ), and watch Cursor suggest a tidy diff right in front of your eyes. Nothing sneakyâjust a controlled, color-coded change you can approve or toss if itâs not what you had in mind.
- AI Chat (Cmd/Ctrl+L) â This is like ChatGPT, but it knows your codebase. It hands out along-side your editor panes. Ask why a component is behaving weirdly, brainstorm ideas, or generate new code blocks. By default, it sees the current file, but you can widen its gaze to the whole repo with @codebase.
- The Agent (Cmd/Ctrl+I) â For the big jobs. Describe a goal (âAdd authentication with GitHub and Googleâ), and Cursor will plan the steps, touch multiple files, and even run commandsâalways asking before it does anything dangerous. This is where you go from âpair programmerâ to âproject collaborator.â
Some Inspiration for the Quick Editor

The inline editor is Cursorâs scalpelâitâs sharp, precise, and surprisingly versatile once you start leaning on it. A few of my favorite quick tricks:
- Refactor without the tedium: Highlight a callback hell nightmare, hit Cmd/Ctrl+K, and ask Cursor to rewrite it with async/await. Boomâcleaner code in seconds.
- Generate boilerplate: Tired of writing the same prop-type interfaces or test scaffolding? Select a stub, tell Cursor what you need, and let it flesh things out.
- Convert styles on the fly: Need to move from plain CSS to Tailwind or from Tailwind to inline styles? Cursor can handle the translation with a single instruction.
- Explain before you change: Select a gnarly function and just ask Cursor âexplain this.â Youâll get a quick natural-language breakdown before deciding what to tweak.
- Add guardrails: Highlight a function and say, âAdd input validation with Zod,â or âThrow if the input is null.â Cursor will patch in the safety nets.
These tricks work best when youâre hyper-specific with what you want. Think of it less like a magic wand and more like a super helpful, pair-programming buddy who thrives on clear, concrete instructions. Thatâs the scalpel. But Cursor also gives you bigger hammers when you need them.
Getting the Most Out of the Chat and Agent
As I alluded too above, Chat (Cmd/Ctrl+L) is for conversation and exploration. Itâs best for asking âwhyâ or âwhat ifâ questions, brainstorming, or generating code youâll shape yourself. I use this all of the time to think through various approaches before I write any code. I treat it like a co-worker that Iâm bouncing ideas off ofâexcept I donât have to interrupt them.
- Keep prompts specific (âExplain how this hook manages state across rendersâ beats âExplain thisâ).
- Pull in the right context with @files or @codebase so answers stay grounded in your project.
- Use it as a sounding board before you start refactoringâitâll surface tradeoffs you might miss.
The Agent (Cmd/Ctrl+I) is for execution. Think of it as delegating work to a teammate who follows your plan:
- Start with a high-level description, then ask the agent to generate a step-by-step plan before running anything.
- Approve changes incrementallyâdonât green-light a sweeping set of edits unless youâve reviewed the plan.
- Pair it with tests and Git. Strong test coverage makes it easy to validate the agentâs work, and frequent commits let you roll back if things get messy.
- Use it for repetitive or cross-file tasksâthings that would normally take you 20 minutes of hunt-and-peck are often solved in one go.
Here are some examples of things you might choose to toss at an agent:
- âAdd authentication with GitHub and Google using Supabase. Show me the plan first.â
- âMigrate all class-based components in @components to functional components with hooks.â
- âConvert this component to use Tailwind classes instead of inline styles.â
In short: chat is your whiteboard, agent is your task runner. Bounce ideas in chat, then graduate to the agent when youâre ready to automate.
Why Context Is Everything
In a large enough code base, youâre not going to be able to keep the entire thing in your head at any given timeâand Cursor canât either. In fact, this is probably one of the few places where you have an edge over an LLMâfor now.
If youâre looking to get the most out of Cursor and other tools, then managing context is the name of the game. Sure, Cursor can index your code base, but sometimes that can be too much of a good thing. If you want to get the most out of a tool like Cursor, then youâre going to want to pull in the specific parts of your code base that you want it to know about. Otherwise, itâs hard to blame it if it starts heading off in a direction that you didnât expect. If you didnât explain what you wanted or give the necessary context to a human, itâs unlikely that theyâre going to have what they need in order to be successful and Cursor is no different. Without context is like a smart intern working blindfolded. It might guess, it might improvise, and sometimes it invents nonsense (âhallucinationsâ is the fancy term). Feed it the right context, though, and Cursor becomes sharp, fast, and eerily helpful.
Context does a few magical things:
- Cuts down on guesswork.
- Keeps answers specific to your code instead of generic boilerplate.
- Helps the AI reason about structure and dependencies instead of flailing.
- Saves tokens, which means you save money.
Your job is to do the Big Brain Thinkingâą about the overall big picture and then give Cursor the context it needs in order to do the tedious grunt work.
How Cursor Handles Context
Cursor is not leaving you high-and-dry in this regard. It has some built-in smarts: it grabs the current file, recently viewed files, edit history, compiler errors, and even semantic search results. It will follow your dependency graph and get read the first little bit of every file in order to get a sense of what it does.
But the real control comes from explicit context management.
- @Files / @Folders â Point Cursor to exact code.
- @Symbols â Zero in on a function, class, or hook.
- @Docs â Pull in external documentation (yours or the frameworkâs).
- @Web â Do a live web search mid-chat.
- @Git â Bring in commit history or diffs.
- @Linter Errors â Hand Cursor your error messages so it can fix them.
- @Past Chats â Keep long conversations coherent.
Thatâs just the tactical layer. For strategy, Cursor gives you rules and Notepads.
.cursor/rules
live in your repo, version-controlled, shaping Cursorâs behavior: âAlways use React Query,â âPrefer async/await,â âDonât leave TODO comments.â Think of them as your projectâs constitution.- Notepads are like sticky notes on steroidsâbundles of prompts, docs, and references you can inject whenever needed. Theyâre local, but great for organizing reusable prompts or team knowledge.
Notepads allow you to keep little snippets of information that you can reference at any time and pull into contextâwithout having to type the same things over and over.

Here is an example of some rules to guide Cursor towards writing TypeScript and/or JavaScript in a way that aligns with yourâor my, in this caseâpreferences:
You are an expert TypeScript developer who writes clean, maintainable code that I am not going to regret later and follows strict linting rules.
- Use nullish coalescing (`??`) and optional chaining (`?.`) operators appropriately
- Prefix unused variables with underscore (e.g., `\_unusedParam`)
# JavaScript Best Practices
- Use `const` for all variables that aren't reassigned, `let` otherwise
- Don't use `await` in return statements (return the Promise directly)
- Always use curly braces for control structures, even for single-line blocks
- Prefer object spread (e.g. `{ ...args }`) over `Object.assign`
- Use rest parameters instead of `arguments` object
- Use template literals instead of string concatenation
# Import Organization
- Keep imports at the top of the file
- Group imports in this order: `built-in â external â internal â parent â sibling â index â object â type`
- Add blank lines between import groups
- Sort imports alphabetically within each group
- Avoid duplicate imports
- Avoid circular dependencies
- Ensure member imports are sorted (e.g., `import { A, B, C } from 'module'`)
# Console Usage
- Console statements are allowed but should be used judiciously
Best Practices for Keeping Cursor Sharp
The one thing that Iâve learned from using Cursor every day for a few months now is that all of those Best PracticesÂź that you know youâre supposed to do but you mightâve gotten sloppy with in the past? Theyâre extra important these days. For example, the better your tests are, the easier it is for Cursor to validate whether or not it successfully accomplished a taskâand didnât cause a regression in the process. Itâs one thing to manually test your own code over and over, but itâs extra sobering to have to manually test code that you didnât write. The better your Git etiquette is, the easier it will be to roll back to a known good state in the event that something goes off the rails.
- Review before you merge. Always. The AI is good, but itâs not omniscient.
- Commit early and often. Git is still your real safety net.
- Be precise in prompts. âMake this more efficientâ is vague. âReplace recursion with iteration to avoid stack overflowâ is crisp.
- Break it down. Ask Cursor to outline a plan before making changes.
- Iterate. Think of it like a dialogue, not a vending machine.
- Mind your open files. The fewer distractions, the better Cursor performs.
- Keep files lean. Under 500 lines helps Agent mode stay accurate.
- Stay private when you need to. Ghost Mode ensures nothing leaves your machine.
Wrapping Up
Cursor isnât just an editor with AI bolted on. With proper context management, it becomes a thoughtful coding partner that amplifies your strengths, fills in gaps, and accelerates the mundane parts of software development. Used well, itâs less about âasking AI to code for meâ and more about orchestrating an intelligent partner in your workflow.
TL;DR
The more precisely you guide Cursor, the more it feels like it really understands your projectâand thatâs when the magic happens.