Skip to main content

Cursor Rules Quick Reference

Why Cursor Editor?

  • AI-powered development with project context
  • Automatic rule application for consistency
  • Real-time guidance while coding
  • Framework-specific patterns built-in

Current Rules Overview

RuleApplies ToPurpose
Project StructureAll filesMonorepo context, commands, patterns
Testing PatternsTest filesTesting best practices and patterns
Component DevelopmentReact filesComponent patterns, className requirements
Hook DevelopmentHook filesHook patterns and best practices
Utility DevelopmentUtility filesFunction patterns and error handling
Development WorkflowAll filesDevelopment process and quality
Documentation SyncCode filesDocumentation consistency and JSDoc standards

Rule Application

Always Applied

  • Project Structure
  • Development Workflow

File Type Based

  • .tsx, .ts → Component Development
  • **hooks/**/\*** → Hook Development
  • **utils/**/\*** → Utility Development
  • .test.* → Testing Patterns
  • .ts, .tsx, .js, .jsx → Documentation Sync

Quick Start

  1. Install Cursor from cursor.sh
  2. Open project - Rules auto-apply
  3. Follow patterns - AI guides your development
  4. Create custom rules - Extend for your needs

Custom Rules

Good Practices

---
globs: **/*.tsx
---

# My Rule

Applies to all React components

Bad Practices

#  Too specific

globs: src/components/Button.tsx

# Always apply everything

alwaysApply: true

Auto-Generate Rules

Use Cursor's built-in rule generation:

# In any Cursor chat, type:
/Generate Cursor Rules

Benefits:

  • AI-powered analysis of your conversations
  • Automatic rule creation with proper scoping
  • Smart file pattern detection (globs)
  • Instant rule generation from development decisions

See Official Cursor Rules Documentation for complete details.

Full Documentation

See Cursor Rules Guide for complete details.


_Use Cursor Rules to write better code faster! _