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 classesCreating 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
EOFKey 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.