{"id":"19077605-232f-4cc8-a99c-0abf988febed","slug":"cursor-rules-collection","kind":"skill","name":"cursor-rules-collection","summary":"46 Production-Ready Cursor Rules for Every Tech Stack - Copy & Paste .cursorrules and .mdc Files","owner":"hoangatg","repoUrl":"https://github.com/hoangatg/cursor-rules-collection","license":"MIT","licenseTier":"permissive","trust":"community","stars":0,"match":null,"fewStars":true,"format":"skill","createdAt":"2026-03-17T08:41:49.000Z","addedAt":"2026-10-21T13:54:52.638Z","logoUrl":"https://avatars.githubusercontent.com/u/268088872?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["files-documents","developer-tools"],"tags":["ai-coding","ai-tools","coding-assistant","cursor","cursor-ide","developer-tools","mdc-files"],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-23T20:11:05.167Z","sample":false,"url":"https://conduits.dev/tools/cursor-rules-collection","language":"","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"<div align=\"center\">\n\n# 📏 Cursor Rules Collection\n\n### Production-Ready Rules for Every Tech Stack\n\n**44+ Rules · 6 Categories · Copy & Paste Ready**\n\nThe most comprehensive, community-driven collection of `.cursorrules` and `.mdc` files\nfor [Cursor IDE](https://cursor.sh) — the AI-first code editor.\n\n---\n\n[![Stars](https://img.shields.io/github/stars/hoangatg/cursor-rules-collection?style=for-the-badge&logo=github&color=yellow)](https://github.com/hoangatg/cursor-rules-collection/stargazers)\n[![Forks](https://img.shields.io/github/forks/hoangatg/cursor-rules-collection?style=for-the-badge&logo=github&color=blue)](https://github.com/hoangatg/cursor-rules-collection/network)\n[![Issues](https://img.shields.io/github/issues/hoangatg/cursor-rules-collection?style=for-the-badge&logo=github&color=green)](https://github.com/hoangatg/cursor-rules-collection/issues)\n[![Last Commit](https://img.shields.io/github/last-commit/hoangatg/cursor-rules-collection?style=for-the-badge&logo=github&color=purple)](https://github.com/hoangatg/cursor-rules-collection/commits)\n\n[**Quick Start**](#-quick-start) · [**Browse Rules**](#-browse-rules) · [**Contributing**](#-contributing) · [**FAQ**](#-faq)\n\n</div>\n\n---\n\n## ⚡ Why This Collection?\n\nMost 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.\n\n| Without Rules | With Rules |\n|:---:|:---:|\n| Generic code suggestions | Stack-specific patterns |\n| Ignores project conventions | Follows your architecture |\n| Basic error handling | Production-ready resilience |\n| Default styling | Design system aware |\n\n> 💡 **Think of rules as \"system prompts\" for your coding assistant** — they tell Cursor exactly how to write code for YOUR project.\n\n---\n\n## 🚀 Quick Start\n\n### Method 1: Copy a Single Rule (Fastest)\n\n1. Browse the [rules directory](#-browse-rules) below\n2. Click on the rule you need\n3. Copy the contents into your project's `.cursorrules` file or `.cursor/rules/` directory\n\n### Method 2: Clone the Collection\n\n```bash\n# Clone the full collection\ngit clone https://github.com/hoangatg/cursor-rules-collection.git\n\n# Copy specific rules to your project\ncp cursor-rules-collection/rules/frontend/react.mdc your-project/.cursor/rules/\n```\n\n### Method 3: Cherry-Pick with npx (Coming Soon)\n\n```bash\n# Interactive picker — select the rules you need\nnpx cursor-rules-collection init\n```\n\n### Where to Place Rules\n\n```\nyour-project/\n├── .cursorrules          ← Single rule file (simple)\n└── .cursor/\n    └── rules/            ← Multiple rule files (recommended)\n        ├── react.mdc\n        ├── typescript.mdc\n        └── tailwindcss.mdc\n```\n\n> 📝 **Tip**: Use `.cursor/rules/` directory for multiple rules. Cursor loads all `.mdc` files automatically.\n\n---\n\n## 📚 Browse Rules\n\n### 🎨 Frontend (12 rules)\n\n| Rule | Tech | Description |\n|------|------|-------------|\n| [react.mdc](rules/frontend/react.mdc) | React 19 | Hooks, Server Components, performance patterns |\n| [nextjs.mdc](rules/frontend/nextjs.mdc) | Next.js 15 | App Router, Server Actions, streaming, caching |\n| [vue.mdc](rules/frontend/vue.mdc) | Vue 3 | Composition API, composables, Pinia |\n| [angular.mdc](rules/frontend/angular.mdc) | Angular 18 | Signals, standalone components, modern control flow |\n| [svelte.mdc](rules/frontend/svelte.mdc) | Svelte 5 | Runes, reactivity, SvelteKit |\n| [astro.mdc](rules/frontend/astro.mdc) | Astro 4 | Islands, content collections, hybrid rendering |\n| [typescript.mdc](rules/frontend/typescript.mdc) | TypeScript 5 | Advanced types, generics, strict mode |\n| [javascript.mdc](rules/frontend/javascript.mdc) | JavaScript ES2024 | Modern syntax, async patterns, modules |\n| [tailwindcss.mdc](rules/frontend/tailwindcss.mdc) | Tailwind CSS v4 | Utility classes, design tokens, custom plugins |\n| [css-modules.mdc](rules/frontend/css-modules.mdc) | CSS Modules | Scoped styles, naming conventions, theming |\n| [htmx.mdc](rules/frontend/htmx.mdc) | HTMX | Hypermedia, progressive enhancement |\n| [shadcn-ui.mdc](rules/frontend/shadcn-ui.mdc) | shadcn/ui | Accessible components, Radix primitives |\n\n### ⚙️ Backend (10 rules)\n\n| Rule | Tech | Description |\n|------|------|-------------|\n| [nodejs.mdc](rules/backend/nodejs.mdc) | Node.js 22 | Async patterns, error handling, streams |\n| [express.mdc](rules/backend/express.mdc) | Express.js | Middleware, routing, error handling |\n| [fastapi.mdc](rules/backend/fastapi.mdc) | FastAPI | Async, Pydantic v2, dependency injection |\n| [django.mdc](rules/backend/django.mdc) | Django 5 | ORM, views, REST framework, security |\n| [golang.mdc](rules/backend/golang.mdc) | Go 1.22 | Concurrency, error handling, project structure |\n| [rust.mdc](rules/backend/rust.mdc) | Rust 1.75 | Ownership, async, axum, error handling |\n| [java-spring.mdc](rules/backend/java-spring.mdc) | Spring Boot 3 | JPA, Security, reactive, microservices |\n| [php-laravel.mdc](rules/backend/php-laravel.mdc) | Laravel 11 | Eloquent, Blade, Livewire, API Resources |\n| [graphql.mdc](rules/backend/graphql.mdc) | GraphQL | Schema design, resolvers, federation |\n| [trpc.mdc](rules/backend/trpc.mdc) | tRPC v11 | Type-safe APIs, React Query integration |\n\n### 📱 Mobile (2 rules)\n\n| Rule | Tech | Description |\n|------|------|-------------|\n| [react-native.mdc](rules/mobile/react-native.mdc) | React Native | Navigation, native modules, Expo |\n| [flutter.mdc](rules/mobile/flutter.mdc) | Flutter 3 | Widgets, state management, platform channels |\n\n### 🗄️ Data & Infrastructure (8 rules)\n\n| Rule | Tech | Description |\n|------|------|-------------|\n| [prisma.mdc](rules/data-infra/prisma.mdc) | Prisma ORM | Schema, migrations, relations, transactions |\n| [drizzle.mdc](rules/data-infra/drizzle.mdc) | Drizzle ORM | Type-safe SQL, schema, relational queries |\n| [supabase.mdc](rules/data-infra/supabase.mdc) | Supabase | Auth, Realtime, Edge Functions, RLS |\n| [mongodb.mdc](rules/data-infra/mongodb.mdc) | MongoDB | Aggregation, indexes, Mongoose patterns |\n| [docker.mdc](rules/data-infra/docker.mdc) | Docker | Multi-stage builds, Compose, security |\n| [kubernetes.mdc](rules/data-infra/kubernetes.mdc) | Kubernetes | Deployments, services, Helm charts |\n| [terraform.mdc](rules/data-infra/terraform.mdc) | Terraform | Modules, state, multi-environment |\n| [aws.mdc](rules/data-infra/aws.mdc) | AWS | Lambda, S3, DynamoDB, CDK patterns |\n\n### 🤖 AI & Specialized (8 rules)\n\n| Rule | Tech | Description |\n|------|------|-------------|\n| [ai-coding.mdc](rules/ai-specialized/ai-coding.mdc) | AI Coding | Meta-rules for AI-assisted development |\n| [langchain.mdc](rules/ai-specialized/langchain.mdc) | LangChain | Chains, agents, RAG, memory |\n| [openai-sdk.mdc](rules/ai-specialized/openai-sdk.mdc) | OpenAI SDK | Chat, streaming, function calling, vision |\n| [testing-jest.mdc](rules/ai-specialized/testing-jest.mdc) | Jest | Unit tests, mocking, snapshots, coverage |\n| [testing-playwright.mdc](rules/ai-specialized/testing-playwright.mdc) | Playwright | E2E testing, page objects, assertions |\n| [security.mdc](rules/ai-specialized/security.mdc) | Security | OWASP Top 10, input validation, auth |\n| [performance.mdc](rules/ai-specialized/performance.mdc) | Performance | Core Web Vitals, profiling, optimization |\n| [accessibility.mdc](rules/ai-specialized/accessibility.mdc) | Accessibility | WCAG 2.2, ARIA, keyboard navigation |\n\n### 🏗️ Full-Stack Templates (6 rules)\n\n| Rule | Tech | Description |\n|------|------|-------------|\n| [t3-stack.mdc](rules/fullstack-templates/t3-stack.mdc) | T3 Stack | Next.js + tRPC + Prisma + Tailwind + Auth |\n| [mern-stack.mdc](rules/fullstack-templates/mern-stack.mdc) | MERN | MongoDB + Express + React + Node.js |\n| [nextjs-fullstack.mdc](rules/fullstack-templates/nextjs-fullstack.mdc) | Next.js Full | App Router + Server Actions + DB |\n| [saas-starter.mdc](rules/fullstack-templates/saas-starter.mdc) | SaaS | Auth, billing, dashboard, multitenancy |\n| [landing-page.mdc](rules/fullstack-templates/landing-page.mdc) | Landing Page | Hero, features, pricing, CTA, SEO |\n| [chrome-extension.mdc](rules/fullstack-templates/chrome-extension.mdc) | Chrome Ext | Manifest V3, content scripts, popup |\n\n---\n\n## 🧩 Stack Combinations\n\nCombine multiple rules for your specific stack:\n\n```bash\n# Next.js Full-Stack\ncp rules/frontend/react.mdc rules/frontend/nextjs.mdc rules/frontend/typescript.mdc rules/frontend/tailwindcss.mdc .cursor/rules/\n\n# Python API\ncp rules/backend/fastapi.mdc rules/ai-specialized/security.mdc rules/data-infra/docker.mdc .cursor/rules/\n\n# Mobile App\ncp rules/mobile/react-native.mdc rules/frontend/typescript.mdc rules/ai-specialized/testing-jest.mdc .cursor/rules/\n```\n\n### Popular Combos\n\n| Stack | Rules to Combine |\n|-------|------------------|\n| **Next.js + Supabase** | `nextjs` + `typescript` + `tailwindcss` + `supabase` |\n| **T3 Stack** | `t3-stack` + `typescript` + `prisma` + `trpc` |\n| **Python ML API** | `fastapi` + `langchain` + `docker` |\n| **Vue Enterprise** | `vue` + `typescript` + `testing-playwright` + `security` |\n| **Mobile** | `react-native` + `typescript` + `testing-jest` |\n\n---\n\n## 📖 Rule Format\n\nEach rule follows a consistent `.mdc` format:\n\n```markdown\n---\ndescription: When to apply this rule\nglobs: **/*.tsx, **/*.ts\nalwaysApply: false\n---\n\n# [Technology] Rules\n\n## Architecture\n- [Key architectural decisions]\n\n## Code Style\n- [Naming, formatting, patterns]\n\n## Best Practices\n- [DO this, DON'T do that]\n\n## Common Patterns\n- [Code examples and templates]\n```\n\n### Fields Explained\n\n| Field | Description |\n|-------|-------------|\n| `description` | When Cursor should activate this rule |\n| `globs` | File patterns this rule applies to |\n| `alwaysApply` | If `true`, always active (use sparingly) |\n\n---\n\n## 🤝 Contributing\n\nWe welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for details.\n\n### Quick Contribution Guide\n\n1. **Fork** this repository\n2. Create a new `.mdc` file in the appropriate category folder\n3. Follow the [rule format](#-rule-format) above\n4. Submit a **Pull Request**\n\n### What Makes a Great Rule?\n\n- ✅ Specific to a technology/framework\n- ✅ Includes real-world best practices\n- ✅ Has clear DO/DON'T examples\n- ✅ Uses the latest stable version\n- ❌ Too generic (\"write clean code\")\n- ❌ Contradicts official documentation\n\n---\n\n## ❓ FAQ\n\n<details>\n<summary><b>What's the difference between .cursorrules and .mdc files?</b></summary>\n\n`.cursorrules` is the legacy single-file format. `.mdc` (Markdown Cursor) is the newer format used in `.cursor/rules/` directory, allowing multiple rules per project.\n\n</details>\n\n<details>\n<summary><b>Do these rules work with other AI editors?</b></summary>\n\nThese 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.\n\n</details>\n\n<details>\n<summary><b>Can I use multiple rules at once?</b></summary>\n\nYes! 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.\n\n</details>\n\n<details>\n<summary><b>How do I customize a rule?</b></summary>\n\nCopy the rule to your project and modify it. These are starting points — tailor them to your team's conventions.\n\n</details>\n\n<details>\n<summary><b>Are these rules kept up to date?</b></summary>\n\nYes! We regularly update rules to match the latest framework versions and best practices. Check the commit history for updates.\n\n</details>\n\n---\n\n## 🌟 Related Projects\n\n| Project | Description |\n|---------|-------------|\n| [AI Agent Toolkit](https://github.com/hoangatg/ai-agent-toolkit) | 43 Agents · 95 Skills · 37 Workflows for AI coding assistants |\n\n---\n\n<div align=\"center\">\n\n### ☕ Support This Project\n\nIf these rules save you time, consider supporting the collection!\n\n[![Ko-fi](https://img.shields.io/badge/Ko--fi-Support%20Me-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/hoangatg)\n\n---\n\n### ⭐ Star this repo if it helps your workflow!\n\n**Every star helps developers discover better AI coding rules.**\n\n---\n\n**Built with ❤️ for the Cursor community**\n\n[Report Bug](https://github.com/hoangatg/cursor-rules-collection/issues) · [Request Rule](https://github.com/hoangatg/cursor-rules-collection/issues) · [Discussions](https://github.com/hoangatg/cursor-rules-collection/discussions)\n\n</div>\n"}