In this categoryCursor ยท 26
- How to Install Cursor and Import VS Code Settings (6 Minutes)Start
- Cursor Setup Guide: From Install to Your First AI Edit
- How to Set Up Project Rules in the .cursor/rules Folder
- How to Set Up Codebase Indexing in Cursor
- How to Enforce Project Conventions with Cursor Rules
- How to Write a Team Rule That Applies Only to Certain Files
- How to Migrate a Legacy .cursorrules File to the New Rules Folder
- How to Use Cursor Rules to Guide AI Edits
- How to Set Project Rules in Cursor
- How to Add a .cursorrules File to Steer Cursor
- How to Customize Cursor Keyboard Shortcuts
- How to Edit Multiple Files at Once with Cursor Composer
- How to Use Cursor Tab Completion Effectively
- How to Edit Code Inline with Cmd+K in Cursor
- How to Add Context to Cursor Chat with @ Mentions
- How to Choose and Switch AI Models in Cursor
- How to Add Library Docs as Context with @Docs in Cursor
- How to Generate and Maintain Tests with Cursor Composer
- How to Undo a Composer Change with Checkpoints in Cursor
- How to Use Cursor Agent Mode to Build a Feature End to End
- How to Connect an MCP Server to Cursor
- How to Refactor Across Your Whole Codebase in Cursor
- How to Query Your Database from Cursor with a Postgres MCP Server
- How to Let Cursor Run Commands Automatically (and Keep It Safe)
- How to Build a Full Feature Across Frontend and Backend with Composer
- How to Debug an MCP Server That Will Not Connect in Cursor
How to Add a .cursorrules File to Steer Cursor
Drop a rules file at your repo root so Cursor follows your stack and conventions without you repeating them in chat.
Cursor reads a rules file at the root of your project and feeds it to the model on every request. A few crisp lines about your stack and house style stop you from re-explaining the same things in chat all day. This guide adds one and confirms Cursor honors it.
What you need
- Cursor installed with a project open
- A clear idea of your build and test commands
- About 5 minutes
Step 1: Create the rules file
Place a .cursorrules file at the repo root. Keep it to short imperative bullets covering stack, style, and anything surprising about the layout.
- Stack: React + TypeScript (strict), Vite, Vitest.
- Use function components and hooks only; no class components.
- Imports: named exports, sorted, no default exports.
- Run the test suite mentally before suggesting an edit.
- Money is integer cents, never a float.Step 2: Reload so Cursor picks it up
Cursor loads the file when the workspace opens. After creating or editing it, reload the window so the new rules take effect.
> Developer: Reload WindowStep 3: Test that it sticks
Ask for something that would expose a convention. If the rules loaded, Cursor uses named exports and cents without being told.
Result: Cursor starts every request already knowing your stack and style, so its suggestions land closer to mergeable on the first try.
Watch related tutorials
33:42
41:18
28:05
3:12
26:54
39:10New guides in your inbox
Fresh step-by-step how-to guides as we publish them. One email a week, no more.