Rule
0 installs · 0 said it worked
Next.js App Router coding rules for Cursor
Cursor rules file guiding the AI to follow Next.js App Router best practices, folder structure, and conventions when writing code in a project.
People use this for
- nextjs app router cursor rules
- nextjs project coding conventions
- write nextjs app router code
- cursorrules for nextjs server components
- set up nextjs folder structure for an app router project
- Name
nextjs-app-router-coding-rules-for-cursor- Works with
- Cursor
- License
- CC0(as observed at the source)
- Version
- v1 · updated Nov 29, 2026
Imported on Nov 29, 2026 from github.com . License observed at the source on Nov 29, 2026: CC0.
Are you the author?Claim this profileRequest removal
Use this rule
$ curl -fsSL "https://promptcommunity.dev/api/v1/posts/nextjs-app-router-coding-rules-for-cursor-b3u2/export/mdc" -o .cursor/rules/nextjs-app-router-coding-rules-for-cursor.mdcThen open a new session; Cursor picks it up from .cursor/rules/.
Manual install
Save nextjs-app-router-coding-rules-for-cursor.mdc as .cursor/rules/nextjs-app-router-coding-rules-for-cursor.mdc for this project or ~/.cursor/rules/nextjs-app-router-coding-rules-for-cursor.mdc for every project, then start a new session.
Rule
description: "Cursor rules for Next.js development with App Router integration." globs: */ alwaysApply: false
// Next.js App Router .cursorrules
// Next.js App Router best practices
const nextjsAppRouterBestPractices = [ "Use server components by default", "Implement client components only when necessary", "Utilize the new file-based routing system", "Use layout.js for shared layouts", "Implement loading.js for loading states", "Use error.js for error handling", "Utilize route handlers for API routes", ];
// Folder structure
const folderStructure = app/ layout.js page.js components/ lib/ styles/ public/;
// Additional instructions
const additionalInstructions = `
- Use TypeScript for type safety
- Implement proper metadata for SEO
- Utilize Next.js Image component for optimized images
- Use CSS Modules or Tailwind CSS for styling
- Implement proper error boundaries
- Follow Next.js naming conventions for special files
- Use environment variables for configuration `;
No result recorded yet. Added it? File a Tried-it report so the next person knows how it went in your editor.
Tried it
Reports from people who added this rule to their editor. They roll up into the badges above.
No one has filed a report yet. Try the prompt and be the first.
Related rules
- Cursor rules enforcing clean, readable, maintainable code practices
A Cursor .mdc rule file that guides the assistant toward clean code: named constants, meaningful names, sparing comments, single-purpose functions, DRY, language style standards, extracted conditionals, continuous refactoring, and version control.
Coding · @patrickjs
- Autonomous coding agent that builds a verified app-builder harness
Master system prompt that directs an autonomous senior Python engineer to build a spec-driven, evidence-traced app-builder harness milestone by milestone without asking questions.
Coding · @mahfuzahmedog
- Claude api: reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming,…
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any fo
Coding · @anthropic
- Cursor rules for building Next.js, Supabase, and shadcn PWAs with build notes
A .mdc rules file that sets coding style, stack conventions, and build-notes and context-file rules for an AI agent building a Next.js, Supabase, Shadcn UI Progressive Web App.
Coding · @patrickjs
- Cursor rules for Angular and Novo Elements coding
Cursor rules file guiding the AI to write production-ready Angular code with standalone components using the Novo Elements UI library, following clean code principles.
Coding · @patrickjs
License: CC0v1 · published Nov 29, 2026
Comments
No comments yet. If you tried this prompt, say how it went.