skill
cursor-rules-collection
46 Production-Ready Cursor Rules for Every Tech Stack - Copy & Paste .cursorrules and .mdc Files
Set up
Skills are installed by placing their folder where your agent loads skills.
The download comes from github.com/hoangatg/cursor-rules-collection itself, not from our server, so what you get is exactly what its author published.
Install instructions come from the README
README
synced Oct 23, 2026📏 Cursor Rules Collection
Production-Ready Rules for Every Tech Stack
44+ Rules · 6 Categories · Copy & Paste Ready
The most comprehensive, community-driven collection of .cursorrules and .mdc files
for Cursor IDE — the AI-first code editor.
Quick Start · Browse Rules · Contributing · FAQ
⚡ Why This Collection?
Most AI coding assistants give generic responses. With the right .cursorrules, Cursor becomes a domain expert that understands your stack's conventions, best practices, and patterns.
| Without Rules | With Rules |
|---|---|
| Generic code suggestions | Stack-specific patterns |
| Ignores project conventions | Follows your architecture |
| Basic error handling | Production-ready resilience |
| Default styling | Design system aware |
💡 Think of rules as "system prompts" for your coding assistant — they tell Cursor exactly how to write code for YOUR project.
🚀 Quick Start
Method 1: Copy a Single Rule (Fastest)
- Browse the rules directory below
- Click on the rule you need
- Copy the contents into your project's
.cursorrulesfile or.cursor/rules/directory
Method 2: Clone the Collection
# Clone the full collection
git clone https://github.com/hoangatg/cursor-rules-collection.git
# Copy specific rules to your project
cp cursor-rules-collection/rules/frontend/react.mdc your-project/.cursor/rules/
Method 3: Cherry-Pick with npx (Coming Soon)
# Interactive picker — select the rules you need
npx cursor-rules-collection init
Where to Place Rules
your-project/
├── .cursorrules ← Single rule file (simple)
└── .cursor/
└── rules/ ← Multiple rule files (recommended)
├── react.mdc
├── typescript.mdc
└── tailwindcss.mdc
📝 Tip: Use
.cursor/rules/directory for multiple rules. Cursor loads all.mdcfiles automatically.
📚 Browse Rules
🎨 Frontend (12 rules)
| Rule | Tech | Description |
|---|---|---|
| react.mdc | React 19 | Hooks, Server Components, performance patterns |
| nextjs.mdc | Next.js 15 | App Router, Server Actions, streaming, caching |
| vue.mdc | Vue 3 | Composition API, composables, Pinia |
| angular.mdc | Angular 18 | Signals, standalone components, modern control flow |
| svelte.mdc | Svelte 5 | Runes, reactivity, SvelteKit |
| astro.mdc | Astro 4 | Islands, content collections, hybrid rendering |
| typescript.mdc | TypeScript 5 | Advanced types, generics, strict mode |
| javascript.mdc | JavaScript ES2024 | Modern syntax, async patterns, modules |
| tailwindcss.mdc | Tailwind CSS v4 | Utility classes, design tokens, custom plugins |
| css-modules.mdc | CSS Modules | Scoped styles, naming conventions, theming |
| htmx.mdc | HTMX | Hypermedia, progressive enhancement |
| shadcn-ui.mdc | shadcn/ui | Accessible components, Radix primitives |
⚙️ Backend (10 rules)
| Rule | Tech | Description |
|---|---|---|
| nodejs.mdc | Node.js 22 | Async patterns, error handling, streams |
| express.mdc | Express.js | Middleware, routing, error handling |
| fastapi.mdc | FastAPI | Async, Pydantic v2, dependency injection |
| django.mdc | Django 5 | ORM, views, REST framework, security |
| golang.mdc | Go 1.22 | Concurrency, error handling, project structure |
| rust.mdc | Rust 1.75 | Ownership, async, axum, error handling |
| java-spring.mdc | Spring Boot 3 | JPA, Security, reactive, microservices |
| php-laravel.mdc | Laravel 11 | Eloquent, Blade, Livewire, API Resources |
| graphql.mdc | GraphQL | Schema design, resolvers, federation |
| trpc.mdc | tRPC v11 | Type-safe APIs, React Query integration |
📱 Mobile (2 rules)
| Rule | Tech | Description |
|---|---|---|
| react-native.mdc | React Native | Navigation, native modules, Expo |
| flutter.mdc | Flutter 3 | Widgets, state management, platform channels |
🗄️ Data & Infrastructure (8 rules)
| Rule | Tech | Description |
|---|---|---|
| prisma.mdc | Prisma ORM | Schema, migrations, relations, transactions |
| drizzle.mdc | Drizzle ORM | Type-safe SQL, schema, relational queries |
| supabase.mdc | Supabase | Auth, Realtime, Edge Functions, RLS |
| mongodb.mdc | MongoDB | Aggregation, indexes, Mongoose patterns |
| docker.mdc | Docker | Multi-stage builds, Compose, security |
| kubernetes.mdc | Kubernetes | Deployments, services, Helm charts |
| terraform.mdc | Terraform | Modules, state, multi-environment |
| aws.mdc | AWS | Lambda, S3, DynamoDB, CDK patterns |
🤖 AI & Specialized (8 rules)
| Rule | Tech | Description |
|---|---|---|
| ai-coding.mdc | AI Coding | Meta-rules for AI-assisted development |
| langchain.mdc | LangChain | Chains, agents, RAG, memory |
| openai-sdk.mdc | OpenAI SDK | Chat, streaming, function calling, vision |
| testing-jest.mdc | Jest | Unit tests, mocking, snapshots, coverage |
| testing-playwright.mdc | Playwright | E2E testing, page objects, assertions |
| security.mdc | Security | OWASP Top 10, input validation, auth |
| performance.mdc | Performance | Core Web Vitals, profiling, optimization |
| accessibility.mdc | Accessibility | WCAG 2.2, ARIA, keyboard navigation |
🏗️ Full-Stack Templates (6 rules)
| Rule | Tech | Description |
|---|---|---|
| t3-stack.mdc | T3 Stack | Next.js + tRPC + Prisma + Tailwind + Auth |
| mern-stack.mdc | MERN | MongoDB + Express + React + Node.js |
| nextjs-fullstack.mdc | Next.js Full | App Router + Server Actions + DB |
| saas-starter.mdc | SaaS | Auth, billing, dashboard, multitenancy |
| landing-page.mdc | Landing Page | Hero, features, pricing, CTA, SEO |
| chrome-extension.mdc | Chrome Ext | Manifest V3, content scripts, popup |
🧩 Stack Combinations
Combine multiple rules for your specific stack:
# Next.js Full-Stack
cp rules/frontend/react.mdc rules/frontend/nextjs.mdc rules/frontend/typescript.mdc rules/frontend/tailwindcss.mdc .cursor/rules/
# Python API
cp rules/backend/fastapi.mdc rules/ai-specialized/security.mdc rules/data-infra/docker.mdc .cursor/rules/
# Mobile App
cp rules/mobile/react-native.mdc rules/frontend/typescript.mdc rules/ai-specialized/testing-jest.mdc .cursor/rules/
Popular Combos
| Stack | Rules to Combine |
|---|---|
| Next.js + Supabase | nextjs + typescript + tailwindcss + supabase |
| T3 Stack | t3-stack + typescript + prisma + trpc |
| Python ML API | fastapi + langchain + docker |
| Vue Enterprise | vue + typescript + testing-playwright + security |
| Mobile | react-native + typescript + testing-jest |
📖 Rule Format
Each rule follows a consistent .mdc format:
---
description: When to apply this rule
globs: **/*.tsx, **/*.ts
alwaysApply: false
---
# [Technology] Rules
## Architecture
- [Key architectural decisions]
## Code Style
- [Naming, formatting, patterns]
## Best Practices
- [DO this, DON'T do that]
## Common Patterns
- [Code examples and templates]
Fields Explained
| Field | Description |
|---|---|
description | When Cursor should activate this rule |
globs | File patterns this rule applies to |
alwaysApply | If true, always active (use sparingly) |
🤝 Contributing
We welcome contributions! See CONTRIBUTING.md for details.
Quick Contribution Guide
- Fork this repository
- Create a new
.mdcfile in the appropriate category folder - Follow the rule format above
- Submit a Pull Request
What Makes a Great Rule?
- ✅ Specific to a technology/framework
- ✅ Includes real-world best practices
- ✅ Has clear DO/DON'T examples
- ✅ Uses the latest stable version
- ❌ Too generic ("write clean code")
- ❌ Contradicts official documentation
❓ FAQ
.cursorrules is the legacy single-file format. .mdc (Markdown Cursor) is the newer format used in .cursor/rules/ directory, allowing multiple rules per project.
These rules are optimized for Cursor but the principles apply to any AI coding assistant. The .mdc format is Cursor-specific, but the content can be adapted for Claude, Copilot, etc.
Yes! Place multiple .mdc files in .cursor/rules/ and Cursor will load all of them. Use the globs field to scope rules to specific file types.
Copy the rule to your project and modify it. These are starting points — tailor them to your team's conventions.
Yes! We regularly update rules to match the latest framework versions and best practices. Check the commit history for updates.
🌟 Related Projects
| Project | Description |
|---|---|
| AI Agent Toolkit | 43 Agents · 95 Skills · 37 Workflows for AI coding assistants |
☕ Support This Project
If these rules save you time, consider supporting the collection!
⭐ Star this repo if it helps your workflow!
Every star helps developers discover better AI coding rules.
Built with ❤️ for the Cursor community