awesome-cursorrules

repository·main·Indexed 12 days ago

https://github.com/patrickjs/awesome-cursorrules

A curated collection of .mdc (Markdown Cursor) rule files designed to enhance the Cursor AI editor with project-specific context, coding standards, and framework-specific guidance. It provides specialized rules for frontend frameworks (Next.js 14/15, React, Vue 3, Svelte), backend technologies (Go, Python FastAPI, Java Spring Boot, Elixir), mobile development (SwiftUI, Jetpack Compose, Flutter), and general engineering disciplines like Anti-Sycophancy Code Discipline and PR reviews.

Tokens
253.8K
Snippets
493
Records
1.1K
Agent score
99%

What's inside awesome-cursorrules

  1. Browse Frontend Framework and Library Cursor Rules

    main

    The awesome-cursorrules repository provides a collection of .mdc rule files designed to optimize Cursor AI development for specific frontend technologies. You can find specialized rules for:

    • Angular: Options for Novo Elements UI and standard TypeScript integration.
    • Astro: TypeScript-focused development.
    • Next.js: Extensive coverage including versions 14 and 15, App Router, Supabase integration (with security rules), TanStack Query v5, SEO optimization, and Tailwind CSS.
    • React: Component creation, FormEngine AI integration, and various stack combinations (Node.js, Symfony, etc.).
    • Svelte/SvelteKit: Support for Svelte 4 vs 5 and SvelteKit with Tailwind/TypeScript.
    • Solid.js: Basic setup, TypeScript, and Tailwind CSS.
    • Vue 3: Nuxt 3 integration, Composition API, and full AI stack setups.
    • Other: Qwik, Shopify Theme (Liquid), TanStack Router, and Beefree SDK.
  2. Browse Games and Graphics Cursor Rules

    main

    Specialized rules for developing interactive visual applications and games:

    • Game Engines: Unity (C#), GameMaker (GML), and DragonRuby.
    • Graphics/Scripting: Blender Python Add-ons (operators, panels, properties) and Graphical Apps Development.
    • Niche: ASCII Simulation Game development.
  3. Browse Backend and Full-Stack Cursor Rules

    main

    The awesome-cursorrules repository provides specialized .mdc rule files for various backend and full-stack technologies. These rules are designed to be used with Cursor to provide context-aware coding assistance, enforcing best practices, architectural boundaries, and specific framework patterns.

    Available backend/full-stack rules include:

    • Cloudflare/Hono/Angular: Full-stack SaaS on Cloudflare Workers.
    • Convex: Best practices for Convex development.
    • Deno: Integration techniques for Deno.
    • Elixir: Guidelines for Elixir, Phoenix, and Docker setups.
    • Go: Scalability, ServeMux REST APIs, Fiber integration, and Temporal DSL.
    • Java: Spring Boot and JPA integration.
    • Laravel: PHP 8.3 and TALL Stack best practices.
    • Node.js: MongoDB, JWT, Express, and React integrations.
    • Python: FastAPI (Scalable, Production Architecture, Best Practices), Django, and Flask.
    • Rails: Basic setup for Rails 8.
    • TanStack Start: Full-stack React with server functions and SSR.
  4. Browse available Cursor Rules by category

    main

    The awesome-cursorrules repository provides a curated collection of .mdc files designed to be used as rules in the Cursor AI editor. These rules are categorized to help you find specific guidance for your tech stack.

    Available categories include:

    • Backend and Full-Stack: Includes rules for Python (Best Practices, Developer, Projects), Rust, C++, Fortran, and R.
    • Frontend Frameworks and Libraries: Extensive coverage for TypeScript with various combinations of React, Next.js, Vue.js, Tailwind, Shadcn/ui, and Vite.
    • Data Science and ML: Rules for AutoML, Pandas (scikit-learn), PyTorch, TensorFlow, and PySpark ETL.
    • Blockchain: Specialized rules for Solidity (Foundry, Hardhat, React), Solana (Wallet-Aware), and Rell.
    • Security: DevSecOps, SSDLC, and AppSec guidelines.
    • Documentation: Best practices for READMEs, How-To guides, and Gherkin-style testing.
  5. Browse Mobile Development Cursor Rules

    main

    Use these specialized rules to guide AI coding agents in mobile application development across different platforms and frameworks:

    • Android: Jetpack Compose guidelines.
    • iOS: SwiftUI and UIKit guidelines.
    • Cross-Platform: Flutter, React Native (Expo), NativeScript, and HarmonyOS ArkTS.
    • Testing/Tooling: TypeScript with Expo, Jest, and Detox.
    • General: Cursor Rules Pack v2 (covers dependency discipline, error handling, state management, and webhook security).
  6. Structure and frontmatter for .mdc rules

    main

    When creating or contributing a new .mdc rule, the file must include a YAML frontmatter block at the top to define its behavior within Cursor.

    Key fields:

    • description: A one-line summary explaining the rule's purpose. This is used by Cursor to understand when the rule is relevant.
    • globs: A list of file patterns (e.g., **/*.ts) that determine when the rule should automatically attach to the context.
    • alwaysApply: A boolean.
      • Set to false to keep the rule scoped only to the files matching the globs or when explicitly requested.
      • Set to true only for universal guidance that must apply to every single request.
    ---
    description: One-line summary of what this rule helps Cursor do
    globs: **/*.ts, **/*.tsx
    alwaysApply: false
    ---
  7. What are Cursor Project Rules

    main

    Cursor Project Rules are Markdown-based .mdc files used to enhance the behavior of the Cursor AI editor. They allow you to provide project-specific guidance, reusable coding standards, and context that general AI models might lack.

    By using these rules, you can:

    • Define Local Architecture: Describe how your specific project is structured.
    • Enforce Consistency: Guide Cursor toward specific naming conventions, styles, and review expectations used by your team.
    • Reduce Manual Edits: Provide context up front so generated code is more accurate on the first pass.
    • Align Teams: Shared .mdc files ensure all contributors receive the same AI assistance aligned with project standards.
  8. Use TanStack Router (React) rules

    main

    When using TanStack Router v1, these rules guide the AI in implementing:

    • File-based routing.
    • Typed params and search validation.
    • Loaders and auth guards.
    • Route preloading.
    https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/tanstack-router-react-cursorrules-prompt-file.mdc
  9. Use Next.js (TanStack Query v5) rules

    main

    When developing with Next.js App Router and TanStack Query v5, use this rule set to ensure correct implementation of:

    • HydrationBoundary pattern: For efficient data prefetching and hydration.
    • Server Actions: Using them correctly as mutations.
    • Optimistic Updates: Implementing smooth UI transitions during data changes.
    https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/nextjs-tanstack-query-cursorrules-prompt-file.mdc