Cursor rules for Next.js
Short answer: a Cursor rule is a .mdc file in .cursor/rules/ that tells Cursor how to write code for your project. Start with one general Next.js rule, then add rules for the libraries you use. Our database holds 104 open-license Cursor rules tagged Next.js. These 5 cover the common cases.
Want picks for your own repo? Scan your project free. You see the match count and 2 picks. The full list is $9 once, up to 30 ranked picks for that scan.
5 Cursor rules for Next.js
| Rule | Repo | License | What it covers | Install |
|---|---|---|---|---|
| next-js | sanjeed5/awesome-cursor-rules-mdc | CC0-1.0 | General Next.js practices | curl -fsSL --create-dirs -o .cursor/rules/next-js.mdc https://raw.githubusercontent.com/sanjeed5/awesome-cursor-rules-mdc/HEAD/rules-mdc/next-js.mdc |
| nextjs | claire-gong-18/awesome-cursorrules | CC0-1.0 | Next.js with TypeScript and Tailwind | curl -fsSL --create-dirs -o .cursor/rules/nextjs.mdc https://raw.githubusercontent.com/claire-gong-18/awesome-cursorrules/HEAD/rules-new/nextjs.mdc |
| app-router-patterns | tugkanboz/awesome-cursorrules | MIT | App Router: Server and Client Components, Route Handlers, Server Actions | curl -fsSL --create-dirs -o .cursor/rules/app-router-patterns.mdc https://raw.githubusercontent.com/tugkanboz/awesome-cursorrules/HEAD/example-structures/next-js/.cursor/rules/app-router-patterns.mdc |
| shadcn | sanjeed5/awesome-cursor-rules-mdc | CC0-1.0 | shadcn/ui components | curl -fsSL --create-dirs -o .cursor/rules/shadcn.mdc https://raw.githubusercontent.com/sanjeed5/awesome-cursor-rules-mdc/HEAD/rules-mdc/shadcn.mdc |
| tailwind | sanjeed5/awesome-cursor-rules-mdc | CC0-1.0 | Tailwind CSS | curl -fsSL --create-dirs -o .cursor/rules/tailwind.mdc https://raw.githubusercontent.com/sanjeed5/awesome-cursor-rules-mdc/HEAD/rules-mdc/tailwind.mdc |
Each install line downloads one .mdc file into .cursor/rules/ in your repo, where Cursor reads project rules (Cursor rules docs). Open the file and trim what does not fit your project before you commit it.
How to pick rules
- One general rule for the language or framework.
- One rule per main library you use. Skip rules for libraries you do not use, since each one adds to the prompt.
- Your own rule for team habits: folder layout, naming, test commands.
Next.js changed a lot between versions. Read a rule before you add it and check that it matches your version and router.
For React without Next.js, see Cursor rules for React. For Claude Code skills, see the Next.js guide and the Next.js skills page.
FAQ
Where do Cursor rules go?
In .cursor/rules/ at the root of your repo, as .mdc files. Cursor reads them for that project. Commit the folder so your team gets the same rules.
Should I use .cursorrules or .cursor/rules?
Cursor's docs describe project rules as .mdc files in .cursor/rules/. The install lines above use that folder.
Do Cursor rules work in Claude Code? Not as is. Claude Code reads SKILL.md skills and CLAUDE.md. Our scan finds both Cursor rules and skills for your repo.
Are these rules free? Yes. Each one shows its license in the table.
Checked 2026-10-24. Prices and policies change. Confirm on the source before you buy.
Sources
More guides
- Best Claude Code skills for Next.js: 3 free picks and how to install them (2026)
- Best Claude Code skills for Python: 6 free picks and how to install them (2026)
- Claude Code frontend design skill: how to install it, plus 4 more UI picks (2026)
- Claude Code Playwright skill: 5 picks and how to install them (2026)
- Claude Code security skills: 5 free picks for security review and scans (2026)
- Claude Code skills for code review: 5 free picks with install commands (2026)