Sandbox
@PatrickJS/awesome-cursorrules

Curated Cursor Project Rules in `.mdc` files

This repository collects reusable Cursor Project Rules for many frameworks, languages, and workflows. The files live in `rules/` as `.mdc` documents that tell Cursor how to behave in a specific project or context. You pick the rules you want and add them to `.cursor/rules/` in your own repo.

40,751 stars3.5k forksJavaScriptUpdated 3mo ago
Who it's for

Builders who want Cursor to use shared project rules for frameworks, testing, security, or code style.

What it delivers

You can give Cursor project-specific guidance so its edits, suggestions, and reviews fit your codebase more consistently.

What it does

Framework-specific rules

Includes rules for many stacks like Next.js, React, Vue, SvelteKit, FastAPI, Go, Laravel, and WordPress.

Testing guidance

Includes rules for Cypress, Playwright, Jest, Gherkin, and PR review workflows.

Security and code quality rules

Includes rules for anti-hallucination, clean code, code quality, and security-focused patterns.

Project rule format

Uses Cursor Project Rules in `.mdc` files that live in `.cursor/rules/`.

Curated repository list

Acts as an awesome-list of ready-made rules builders can browse and copy into their projects.

README

Awesome Cursor Rules Awesome

Awesome Cursor LogoAwesome Cursor Logo

Cursor Project Rules enhance Cursor AI editor behavior with project-specific guidance and reusable coding standards.

Cursor AI is an AI-powered code editor. Cursor Project Rules are Markdown-based .mdc files that live in .cursor/rules/ and tell Cursor how to behave for specific projects, file types, frameworks, and workflows.

Sponsorships

coderabbit.ai - Cut Code Review Time & Bugs in Half. Instantly.

CodeRabbit.ai Sponsorship Logo

Unblocked MCP- Supercharge Cursor with your team’s knowledge

Unblocked Sponsorship Logo

Warp - Built for coding with multiple AI agents

Warp Sponsorship Logo

Contents

Why Cursor Rules

Cursor rules help developers define project-specific instructions for Cursor AI. This repository uses the modern .mdc Project Rules format.

Customized behavior means Cursor can respond to the specific needs of a project instead of relying only on general coding knowledge. Rules can describe local architecture, preferred libraries, common methods, domain constraints, and other context that makes generated code more relevant.

Consistency is the other big win. By defining coding standards and best practices in .mdc files, teams can guide Cursor toward code that matches the project's style, naming, structure, and review expectations.

Project rules also reduce repeated manual editing. Well-scoped rules give Cursor reusable project knowledge up front, so suggestions are more likely to fit the codebase on the first pass and less likely to need the same corrections again.

For teams, shared .cursor/rules/*.mdc files keep AI assistance aligned across contributors. Everyone can work from the same project-specific guidance, whether the rule covers framework usage, security requirements, testing conventions, or workflow details.

By adding selected .mdc files to .cursor/rules/, you can use these rules directly in your project.

Rules

Frontend Frameworks and Libraries

Backend and Full-Stack

Mobile Development

Games and Graphics

CSS and Styling

State Management

  • React (Redux, TypeScript) - React development with Redux and TypeScript integration.
  • React (MobX) - React development with MobX integration.
  • React (React Query) - React development with React Query integration.
  • React (TanStack Router + Query) - React SPAs combining TanStack Router v1 and TanStack Query v5 for zero-loading-spinner routing and type-safe server state.
  • React (Zustand) - React state management with Zustand stores, selectors, middleware, persistence, and testing.
  • TanStack Query v5 - Query options, query key factories, mutations, optimistic updates, infinite queries, Suspense, and prefetching.
  • Vue (Pinia) - Vue 3 state management with Pinia stores, Composition API usage, SSR, persistence, and testing.

Database and API

Testing

Hosting and Deployments

  • Cloudflare Email to Telegram - Setting up email-to-Telegram forwarding via Cloudflare Email Routing and Workers using the mail2tg CLI.
  • Netlify - Official deployment platform integration.
  • Vercel - Deployment with serverless functions, Edge Runtime, middleware, caching, CI/CD, and production-ready configuration.

Build Tools and Development

Language-Specific

Security

  • DevSecOps, SSDLC, and AppSec - Secure coding, secret handling, dependency hygiene, authentication, authorization, security testing, and compliance documentation.

Documentation

Directories

How to Use

Project Rules

  1. Install Cursor AI if you haven't already.
  2. Browse the rules above to find an .mdc rule that suits your needs.
  3. Create a .cursor/rules/ directory in your project if it does not already exist.
  4. Copy the chosen .mdc file into .cursor/rules/.
  5. Customize the rule as needed for your specific project requirements.

Contributing

Contributions are welcome! If you have a great Cursor rule to share:

  1. Fork this repository.

  2. Choose a descriptive slug for the rule, such as react-typescript or python-fastapi.

  3. Add the canonical .mdc rule under rules/.

  4. New rules/*.mdc files must start with frontmatter like this:

    ---
    description: One-line summary of what this rule helps Cursor do
    globs: **/*.ts, **/*.tsx
    alwaysApply: false
    ---
    

    The description field explains the rule's purpose to Cursor and contributors. The globs field lists the file patterns where the rule should auto-attach. Use alwaysApply: false to keep the rule scoped to matching or requested context, and use alwaysApply: true only for universal guidance that should apply to every request.

  5. Update the main README.md file, adding your contribution to the appropriate category.

  6. Ensure your contribution follows the repository formatting and naming guidelines.

  7. Submit a pull request.

Please ensure your contribution is original or properly credited if based on existing work. Keep descriptions neutral, practical, and focused on reusable Cursor rule value.

Footnotes

Sponsorships

  • coderabbit.ai - Cut code review time and bugs in half.
  • Unblocked MCP - Team knowledge for Cursor workflows.
  • Warp - Terminal workflows for coding with multiple AI agents.

Files in the repo

Repository payload15 top-level entries
  • .github
  • rules
  • scripts
  • .gitignore
  • code-of-conduct.md
  • contributing.md
  • cr_logo.png
  • cursor-ai-logo.png
  • LICENSE
  • LOCKUP_VERTICAL_25D_DARK.png
  • LOCKUP_VERTICAL_25D_LIGHT.png
  • package.json
  • pnpm-lock.yaml
  • README.md
  • Unblocked-logo-sq-words-over-gradient-1024w.png

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More collections

The awesome collection of OpenClaw skills. 5,400+ skills filtered and categorized from the official OpenClaw Skills Registry.🦞

52k

A curated collection of 1000+ agent skills from official dev teams and the community, compatible with Claude Code, Codex, Gemini CLI, Cursor, and more.

34k