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

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.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
02-jeecg-claude-code-cost-cut.md
Comando de instalación directa
npx -y tokrepo@latest install ca000374-f5d8-4d75-a30c-460fda0b6b0e --target codex

Ejecutar después de confirmar el plan con dry-run.

TL;DR
A big, editable rules library for making Cursor AI follow your project conventi…
§01

What it is

Awesome Cursor Rules is a curated library of Cursor Project Rules you can reuse as a starting point for real projects — especially when you want your AI editor to consistently follow the same conventions without repeating instructions in every chat.

Upstream, the repository describes Cursor Project Rules as Markdown-based .mdc files that live under .cursor/rules/. TokRepo editorial note: the workflow you’re viewing may mention older “.cursorrules” conventions, but the upstream repo itself is organized around .mdc rule files — treat the upstream README as the source of truth for current layout and naming.

Think of this library as a menu. You don’t “install the repo”; you borrow a ruleset, paste it into your project, and then tune it until it reflects how your codebase actually works.

Repository signal (verified): 39,509 GitHub stars, license CC0-1.0, last updated 2026-05-14T00:09:14Z (fetched 2026-05-14T00:38:29.999279+00:00).

§02

How it saves time or tokens

Rules aren’t “magic prompts.” They’re a consistency layer that turns repeated corrections into a one-time edit:

  • They reduce back-and-forth by telling the model what your project expects (structure, naming, testing, error-handling).
  • They prevent “policy drift” when multiple people (or multiple agent runs) touch the same codebase.
  • They make review faster because generated code is closer to your norms on the first pass.

The highest-ROI use case is team work: once a rule file matches your repo, you stop spending tokens re-explaining the basics (“use App Router”, “prefer Zod”, “don’t touch auth helpers”, “tests must be deterministic”).

TokRepo editorial heuristic: rules pay for themselves when you can answer “yes” to at least one of these:

  • You work in a repo with established conventions that matter in review.
  • Multiple people (or multiple agents) contribute to the same codebase.
  • Mistakes are costly (auth, payments, data migrations, security).
  • You’ve noticed the AI repeatedly making the same class of error.
§03

How to use

  1. Pick a rule that matches your stack. Start with the closest .mdc file in the upstream rules/ directory; don’t optimize too early.
  2. Install it in your repo. Follow the upstream convention (Cursor Project Rules in .cursor/rules/). If your toolchain still expects a different filename, adapt intentionally and document the choice in your repo.
  3. Make it yours (this is the real work). Replace generic statements with your realities:
  • framework versions and router style,
  • directory conventions and module boundaries,
  • “allowed” vs “banned” dependencies,
  • error-handling and logging expectations,
  • test commands and what a passing run looks like.
  1. Add one explicit “proof step.” A good rule file doesn’t just say what to do; it says how to verify it:
  • “run pnpm test before finishing,”
  • “no changes without updating snapshots,”
  • “typecheck must pass.”
  1. Validate on one real task. Use a small change request (fix a failing test, add one endpoint, refactor one file) and check if the agent behavior matches the rule.
  2. Version it. Keep rule files in git and review them like code. A rules change can be a behavior change.

A practical “rules tuning” checklist

When you paste in a ruleset, do these edits before you call it “done”:

  • Replace placeholders with your actual commands (pnpm vs npm, uv vs pip, go test ./..., etc.).
  • Specify code style where it matters (file naming, component patterns, imports).
  • Add a section for security constraints relevant to your app (secrets handling, auth boundaries).
  • Add a section for what not to change (public API, migrations, config files).
  • Add a short “if unsure, ask” rule (better a question than a confident wrong change).

How .mdc rules are typically scoped (why it matters)

Many Cursor Project Rules use a small YAML frontmatter block to control where a rule applies. You’ll commonly see fields like:

  • description: a human-readable summary of what the rule set is trying to enforce.
  • globs: which files the rule applies to (for example */).
  • alwaysApply: whether the rule should always be active or only in specific contexts.

TokRepo editorial take: scoping is the difference between “helpful guardrails” and “noise.” If you apply a very strict framework rule to every file, the agent can become rigid and less helpful for unrelated tasks (scripts, docs, ops).

A practical pattern that works well:

  1. One small, always-on baseline rule for safety and repo conventions (no secrets, run tests, don’t refactor).
  2. Stack-specific rules (Next.js, Django, Go services) scoped to the folders where they apply.
  3. Task-specific rules for high-risk operations (migrations, auth, payments) that only apply when you’re working in those areas.

This layering keeps agent behavior predictable without turning every interaction into a compliance exercise.

What to include in a high-signal ruleset

If you’re editing a ruleset from this library, prioritize information the agent can use operationally:

  • Project boundaries: “don’t import from X layer into Y layer”, “UI cannot call database directly”.
  • Verification loop: the one command that proves correctness (tests/build/typecheck).
  • Security invariants: “never log tokens”, “don’t change auth flows without tests”.
  • Output expectations: “prefer small diffs”, “keep changes reviewable”, “avoid unrelated refactors”.

Avoid dumping huge style guides into rules. If a rule is too long to maintain, it won’t survive.

Making rules play nicely with other “instruction layers”

Most teams have more than one place where conventions live: linters, formatter configs, framework docs, README notes, and sometimes other agent instructions. A good Cursor ruleset should not fight those sources.

TokRepo editorial approach:

  • If a linter/formatter exists, treat it as the authority (the rules should tell the agent to obey it, not redefine it).
  • If the repo has a CONTRIBUTING.md or architecture doc, link to it and summarize only the parts the agent needs to follow consistently.
  • If you have other agent tooling (terminal agents, CI bots), align on the same “proof step” so agents don’t produce “it works on my machine” patches.
§04

Example

This repo contains many rules; the excerpt below (from a Next.js + Supabase rules file) shows what “high-signal” constraints look like: a clear DO/DON’T plus the reason.

§05

RULE 1: NEVER use getSession() on the server

SECURITY CRITICAL. getSession() reads the JWT from cookies WITHOUT verifying it.

ALWAYS use getUser() for server-side auth.


TokRepo editorial take: even if you don’t use Supabase, the style is transferable — “explicit DO/DON’T + why” beats vague guidance every time. The goal is not to micromanage the model; it’s to remove entire categories of mistakes.
§06

Related on TokRepo

TokRepo editorial rollout suggestion: treat rules like you’d treat a lint rule. Start with one repo, validate that rules reduce review time, then reuse the same baseline ruleset across other repos. If a rule causes friction, tighten its scope rather than deleting it outright.

§07

Common pitfalls

  • Treating rules as “set and forget.” Your repo changes; your rules should evolve too.
  • Overfitting to a toy example. Validate rules with a real bugfix or feature, not a demo prompt.
  • Mixing incompatible rule sources. If you combine multiple rulesets, resolve conflicts explicitly.
  • Writing rules that can’t be checked. Prefer concrete, testable constraints over abstractions.
  • Skipping review. A rules change is a behavior change — review it like code.
  • Trying to encode everything. Keep the rules focused on high-cost mistakes and high-frequency conventions; let normal code review handle the rest.

Preguntas frecuentes

What are Cursor Project Rules?+

Cursor Project Rules are project-scoped instruction files (commonly organized under `.cursor/rules/`) that tell the Cursor AI editor how to behave for a specific repository: conventions, constraints, and workflow expectations.

Is this the same as a single `.cursorrules` file?+

Not always. The TokRepo workflow may mention legacy `.cursorrules` conventions, but the upstream Awesome Cursor Rules repo documents a modern `.mdc` Project Rules format. Follow the upstream README and Cursor’s current docs for the canonical structure.

How do I choose the right rule file?+

Start with the closest match to your stack (framework + language + tooling). Then edit it to reflect your repo’s actual constraints (versions, folder layout, test commands, security rules).

What’s the safest way to roll rules out on a team?+

Commit the rules to git, review changes like code, and validate on one real task before making the rules your default in new repos.

Can rules make AI output deterministic?+

No, but they can make outputs more consistent and more aligned with your repo conventions, which reduces review time and repeated corrections.

Referencias (3)
🙏

Fuente y agradecimientos

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.

Discusión

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

Activos relacionados