A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
Best Cursor Rules is a curated collection of 33 high-quality Cursor AI rules that actually work. Includes a Setup Wizard
A curated collection of Cursor AI rules that actually work.
Skip the guesswork. These rules are battle-tested, framework-specific, and ready to drop into your project.
Option A: Use the Setup Wizard (recommended)
SETUP-WIZARD.md into the chat.cursor/rules/ folder automaticallyNote: The wizard must be run from inside your actual project directory, not from this repository.
[!TIP] Plan Mode (recommended) — More structured. The AI analyzes your project, asks focused questions, shows you exactly what will be created, then executes after you confirm.
[!TIP] Agent Mode — More conversational. The AI iterates with you and creates files on the fly. Good if you want to adjust things as you go.
💎 Pro TipUse the best model you have access to. The wizard does a lot of thinking upfront so you don't have to correct it later. Five minutes with a good model now saves hours of fixes down the road. |
Option B: Manual Setup
.cursor/rules/ in your project rootrules/ folderglobs in each file to match your project structure| Rule | Description |
|---|---|
nextjs-15.mdc | Next.js 15 App Router, Server Components, Server Actions |
react-19.mdc | React 19 patterns, hooks, and best practices |
vue-3.mdc | Vue 3 Composition API and script setup |
svelte-5.mdc | Svelte 5 runes and modern patterns |
astro.mdc | Astro components and island architecture |
| Rule | Description |
|---|---|
typescript.mdc | Strict TypeScript with modern type patterns |
python.mdc | Python 3.12+ with type hints and async |
go.mdc | Go idioms and error handling |
| Rule | Description |
|---|---|
supabase.mdc | Auth, RLS, Edge Functions, Realtime |
fastapi.mdc | FastAPI routes, Pydantic, async patterns |
nodejs.mdc | Node.js with Express/Fastify |
| Rule | Description |
|---|---|
tailwind.mdc | Tailwind CSS v4 patterns and organization |
shadcn-ui.mdc | shadcn/ui component patterns |
| Rule | Description |
|---|---|
vitest.mdc | Vitest with Testing Library |
playwright.mdc | E2E testing with page objects |
| Rule | Description |
|---|---|
clean-code.mdc | Naming, functions, DRY, SOLID |
security.mdc | Auth patterns, secrets, validation |
ai-security.mdc | LLM security, prompt injection, PII filtering |
accessibility.mdc | ARIA, keyboard nav, screen readers |
These combine multiple rules for common technology combinations:
| Rule | Stack |
|---|---|
t3-stack.mdc | Next.js + tRPC + Prisma + Tailwind |
nextjs-supabase.mdc | Next.js + Supabase + shadcn/ui |
mern-stack.mdc | MongoDB + Express + React + Node.js |
python-fastapi.mdc | FastAPI + PostgreSQL + SQLAlchemy |
django-htmx.mdc | Django + HTMX + Tailwind |
The Setup Wizard is a special prompt that turns Cursor into a project analyzer:
package.json, tsconfig.json, config files, etc..cursor/rules/ with customized rulesThe wizard adapts to your project. Using Supabase? It includes those patterns. TypeScript strict mode? It adjusts accordingly. It's not a one-size-fits-all dump of rules.
Each rule uses the MDC (Markdown + Config) format:
---
description: Brief description for AI context
globs: ["**/*.tsx", "**/*.ts"]
alwaysApply: false
---
# Rule Title
## Section
Content, code examples, tables, etc.
description - Helps the AI understand when to apply this ruleglobs - File patterns that trigger this rule (empty = manual only)alwaysApply - If true, always included regardless of file typeRules are written to be concise and scannable. No fluff, just patterns and examples.
Want to add a rule or fix something? Check out CONTRIBUTING.md.
The short version:
rules/.cursor/rules/01-rule-format.mdcCursor's AI is powerful, but it doesn't know your stack. These rules give it the context it needs:
unknown over any" (TypeScript)Without rules, you end up correcting the AI constantly. With the right rules, it writes code the way you want it.
Maintained by Renvia Technologies with contributions from the community.
Licensed under CC0 - do whatever you want with these rules.
"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."
— Linus Torvalds
Built with ☕ and too many terminal tabs
📄 Configuration files that enhance Cursor AI editor experience with custom rules and behaviors
Cursor AI 编程规则精选集 | 132+ 规则,覆盖前端/后端/AI/DevOps 等 32 个领域
Curated AI Prompts for Cursor Rules, Cline, Windsurf and Github Copilot
A practical approach to managing multiple AI agents in Cursor through strict file-tree partitioning and domain boundarie