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 Set Project Rules in Cursor
Add a project rules file so Cursor follows your conventions on every edit instead of relying on per-prompt reminders.
Cursor can read a project rules file that it applies to every AI edit in the repo. Setting it up once means you stop repeating the same conventions in each prompt, and the editor's suggestions arrive already shaped to your house style.
What you need
- Cursor installed with a project open
- A short list of conventions you care about
- About 6 minutes
Step 1: Create the rules file
Project rules live in a rules folder at the repo root. Create the folder and a rules file inside it.
Step 2: Write crisp, imperative rules
Short commands work better than prose. List the conventions you most want enforced and keep each to one line.
# Conventions
- TypeScript strict; never use the any type.
- Named exports only, no default exports.
- Co-locate tests next to the file they cover.
- No comments that just restate the code.Step 3: Confirm Cursor applies them
Ask the editor for a change that would normally tempt a default export. If the rules are loaded, it uses a named export without being told.
Result: Cursor applies your conventions to every edit automatically, so you stop re-explaining house style in each prompt.
Watch related tutorials
41:18
28:05
3:12
26:54
39:10
32:18New guides in your inbox
Fresh step-by-step how-to guides as we publish them. One email a week, no more.