Esta página se muestra en inglés. Una traducción al español está en curso.
PromptsApr 6, 2026·3 min de lectura

Cursor Rules Collection — Community .mdc Config Rules

Community-curated collection of Cursor AI .mdc rule files for 40+ tech stacks. Drop a rule file into your project and Cursor follows your coding standards automatically. 5,000+ stars.

Introducción

Cursor Rules Collection is a community-curated repository of .mdc rule files for 40+ technology stacks with 5,000+ GitHub stars. Each rule file is a structured set of coding conventions, patterns, and best practices that Cursor AI follows automatically when you place it in your project. Instead of repeating "use functional components" or "follow PEP 8" every conversation, write it once as a rule and Cursor remembers forever. Best for teams standardizing AI-generated code across projects. Works with: Cursor AI. Setup time: under 1 minute.


Popular Rules

Frontend

Rule Stack Key Conventions
nextjs-typescript.mdc Next.js + TS App Router, Server Components, Tailwind
react-hooks.mdc React 18+ Functional components, custom hooks, Zustand
vue-composition.mdc Vue 3 Composition API, Pinia, TypeScript
svelte-kit.mdc SvelteKit Runes, TypeScript, form actions
tailwind-ui.mdc Tailwind CSS Utility-first, responsive, dark mode

Backend

Rule Stack Key Conventions
python-fastapi.mdc FastAPI Type hints, Pydantic models, async
go-clean.mdc Go Clean architecture, error handling
rust-idiomatic.mdc Rust Ownership patterns, error handling
node-express.mdc Express.js Middleware patterns, validation
django-rest.mdc Django REST Serializers, viewsets, permissions

DevOps & Infrastructure

Rule Stack Key Conventions
docker-best.mdc Docker Multi-stage builds, security
terraform-modules.mdc Terraform Module patterns, state management
k8s-production.mdc Kubernetes Resource limits, health checks

Rule File Format

---
description: Next.js 14+ with TypeScript conventions
globs: ["**/*.tsx", "**/*.ts"]
alwaysApply: false
---

# Next.js TypeScript Rules

## Component Patterns

- Use functional components exclusively
- Extract custom hooks for shared logic
- Keep components under 150 lines
- Use Server Components by default, Client Components only when needed

## File Naming

- Components: PascalCase (UserProfile.tsx)
- Utilities: camelCase (formatDate.ts)
- API routes: route.ts in app/api/

## State Management

- Server state: React Query / SWR
- Client state: Zustand (not Redux)
- Form state: React Hook Form + Zod

## Styling

- Tailwind CSS utility classes
- No inline styles or CSS modules
- Use cn() for conditional classes

Creating Custom Rules

mkdir -p .cursor/rules
cat > .cursor/rules/my-project.mdc << 'EOF'
---
description: My project conventions
globs: ["**/*.ts"]
alwaysApply: true
---

# Project Rules
- Always use snake_case for database columns
- API responses use camelCase
- All functions must have JSDoc comments
EOF

Key Stats

  • 5,000+ GitHub stars
  • 40+ technology stacks covered
  • 200+ community-contributed rules
  • Compatible with Cursor AI .mdc format
  • Browsable at cursor.directory

FAQ

Q: What are Cursor Rules? A: Cursor Rules are .mdc files that define coding conventions for Cursor AI. Place them in your project and Cursor follows your standards automatically in every conversation.

Q: Are Cursor Rules free? A: Yes, the collection is open-source. Cursor AI itself requires a subscription.

Q: Can I use these rules with Claude Code? A: The .mdc format is Cursor-specific, but the conventions can be adapted into CLAUDE.md or SKILL.md files for Claude Code.


🙏

Fuente y agradecimientos

Created by Pontus Ab and community. Licensed under MIT.

cursor.directory — ⭐ 5,000+

Thanks to the community for standardizing AI-generated code quality.

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.