Awesome Cursor Rules — AI Coding Standards for 30+ Stacks
Curated .cursorrules files for 30+ tech stacks. Drop into your project root so Cursor AI follows your coding standards automatically.
What it is
Awesome Cursor Rules is a community-curated repository of .cursorrules configuration files covering 30+ technology stacks. Each file defines naming conventions, framework patterns, testing approaches, and code style preferences that Cursor AI follows when generating code.
The project targets developers who use Cursor (or GitHub Copilot) and want consistent, project-aware code generation without repeating instructions in every chat session.
How it saves time or tokens
Without a .cursorrules file, developers spend tokens re-explaining their coding standards in every Cursor conversation. A single config file eliminates that repetition entirely. The AI reads the rules once per session and applies them to every generated snippet, saving both prompt tokens and review time.
How to use
- Browse the rules directory on GitHub and find your tech stack.
- Copy the
.cursorrulesfile content for your framework. - Save it as
.cursorrulesin your project root directory. - Cursor AI automatically reads and follows these rules when generating code.
Alternatively, install the VS Code extension:
# Via VS Code marketplace
# Search for 'cursor-rules' by BeilunYang
# Then: Cmd+Shift+P -> 'Cursor Rules: Add .cursorrules' -> select your stack
Example
A typical Next.js .cursorrules file looks like this:
# .cursorrules for Next.js + TypeScript + Tailwind
framework: next.js (app router)
language: typescript strict
styling: tailwind css v4
state: zustand
testing: vitest + playwright
naming:
components: PascalCase
hooks: camelCase with 'use' prefix
files: kebab-case
patterns:
- prefer server components by default
- use 'use client' only when interactivity is needed
- colocate route handlers with pages
Related on TokRepo
- Prompt Library -- browse reusable prompts and rules for AI coding assistants
- AI Tools for Coding -- compare tools that help developers write better code with AI
Common pitfalls
- Do not mix multiple framework rules in one file. Keep one
.cursorrulesper project root. - Rules that are too vague (e.g., 'write clean code') get ignored. Provide specific patterns and naming conventions.
- The
.cursorrulesfile does not enforce rules at build time. It only guides AI-generated suggestions, so you still need linters for enforcement.
Frequently Asked Questions
The repository includes configuration files for 30+ stacks including Next.js, React, Vue, Svelte, Angular, Python/FastAPI, Go, Rust, Ruby on Rails, and more. Each file is tailored to the conventions and best practices of that specific framework.
The .cursorrules format is primarily designed for Cursor AI. GitHub Copilot can also read some of these configuration patterns. Other editors may require different configuration formats for similar functionality.
Start with the template closest to your stack, then modify the naming conventions, patterns, and testing preferences to match your team's standards. The file is plain text so you can add or remove any rule freely.
No. The file is read once per session and adds minimal context to the prompt. Typical .cursorrules files are under 2KB, which is negligible compared to your codebase context.
Cursor reads the .cursorrules file from the project root. For monorepos, place the file at the root with general rules, or use workspace-specific overrides if your editor supports them.
Citations (3)
- Awesome Cursor Rules GitHub— Community-curated .cursorrules for 30+ stacks
- VS Code Marketplace— VS Code extension for installing cursor rules
- Cursor Docs— Cursor AI custom instructions documentation
Related on TokRepo
Source & Thanks
Created by PatrickJS. Licensed under CC0 (Public Domain). awesome-cursorrules — ⭐ 38,700+
Thanks to PatrickJS and 200+ contributors for building the largest open-source .cursorrules collection. Star the original repo to get updates as new rules are added weekly.