Skip to content

UI & Design

Next.js App Router

Free

Next.js App Router practices: server components by default, client components only when needed.

Difficulty intermediate

Purpose

Install the original Next.js App Router rule from PatrickJS/awesome-cursorrules and use it in Cursor.

Procedure

--- name: cursor-nextjs-app-router description: Next.js App Router practices: server components by default, client components only when needed. ---

Next.js App Router

Purpose

Install the original Next.js App Router rule from PatrickJS/awesome-cursorrules and use it in Cursor.

Procedure

Source: https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/nextjs-app-router-cursorrules-prompt-file.mdc Maintainer: Community (PatrickJS/awesome-cursorrules). Skilling lists this rule; the original lives in that repository.

Install

mkdir -p .cursor/rules
curl -fsSL https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/main/rules/nextjs-app-router-cursorrules-prompt-file.mdc -o .cursor/rules/nextjs-app-router.mdc

Run this in the root of your project. Cursor loads .mdc files from .cursor/rules and applies them to the files matched by the globs line. Check Cursor Settings > Rules to see it listed.

What it does

  • Server components first
  • File-based routing and layouts
  • Data fetching patterns

How to use it

Cursor applies it to your project files.

Example requests

1. Use Next.js App Router

Request: Cursor applies it to your project files. Expected: Server components first.

Dependencies

Cursor, and curl.

Compatibility

This document follows the Agent Skills layout (a folder named cursor-nextjs-app-router containing SKILL.md). Claude Code, Cursor, Codex, and Gemini CLI can load that file from the paths in the Skilling installation guide. GitHub Copilot does not load SKILL.md. Use the Copilot instructions copy, and narrow applyTo before you commit it. Last verified 2026-11-15.

Example prompts

Use Next.js App Router

Cursor applies it to your project files.

Expected: Server components first.

Install for Cursor

  1. 1Copy Next.js App Router. The file you want is SKILL.md.
  2. 2For this repository, create the folder and save the file at .cursor/skills/cursor-nextjs-app-router/SKILL.md.
  3. 3To use it on every project on this machine, use ~/.cursor/skills/cursor-nextjs-app-router/SKILL.md instead.
  4. 4The folder name must be cursor-nextjs-app-router. It has to match the name inside the file.
  5. 5Start a new Cursor session. It reads the skill when the session starts.
  6. 6Ask Cursor to use Next.js App Router, or describe the task in the words from the skill summary.

Related

  • Next.js 15 + React 19 + Vercel AI

    Rules for Next.js 15 App Router, React 19, the Vercel AI SDK and Tailwind CSS, with a plan-first process.

  • React Best Practices

    Modern React patterns: small function components, custom hooks, composition and typed props.

  • Tailwind CSS

    Tailwind CSS and UI component practices: config, theme extension, spacing and breakpoints.

Reviews

No reviews yet.

    Sign in to review.

    Report a problem

    Inaccurate steps, an unsafe instruction, or a licensing concern.

    Sign in to report.