Skip to main content
rule

nextjs-seo-dev-cursorrules-prompt-file — Cursor rule: install

A Cursor rule for Next.js work with SEO context, comment-preservation guidance, and a fixed project setup.

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/nextjs-seo-dev-cursorrules-prompt-file.mdc
Open on GitHub

What nextjs-seo-dev-cursorrules-prompt-file does

This rule gives Cursor instructions for Next.js development: add useful comments that explain code changes and keep existing comments unless rewritten code makes them irrelevant. Any line carrying Do not touch this line Cursor must stay unchanged.

It also includes a package.json snapshot with scripts for development, builds, type checks, formatting, and Vercel deployment. The dependency set names Next.js, React, Tailwind CSS, TypeScript, wagmi, viem, RainbowKit, and Uniswap packages. Its file scope is **/*. Because alwaysApply: false is set, Cursor does not mark the rule for automatic use on every request.

What it helps with

  • set a Next.js development context in Cursor
  • keep useful comments while editing code
  • protect marked lines from changes
  • align project edits with package.json
  • guide SEO-focused Next.js work

Example prompts for the agent

  • Use nextjs-seo-dev-cursorrules-prompt-file while adding an SEO-focused Next.js page.
  • Review this code under the rule, keeping relevant comments and leaving Do not touch this line Cursor lines unchanged.
  • Update package.json and the project code according to the rule’s scripts, dependencies, and constraints.

How to install nextjs-seo-dev-cursorrules-prompt-file

Manually: put the files in place

.cursor/rules/nextjs-seo-dev-cursorrules-prompt-file.mdc

Frontmatter: description, globs, alwaysApply

Step by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules

Questions about nextjs-seo-dev-cursorrules-prompt-file

How do I install nextjs-seo-dev-cursorrules-prompt-file in Cursor?

Create .cursor/rules/nextjs-seo-dev-cursorrules-prompt-file.mdc and put the rule content in that file.

What does nextjs-seo-dev-cursorrules-prompt-file do?

It defines Cursor guidance for a Next.js project, covering comments, protected lines, and the package.json context with project scripts and dependencies.

Which files does the rule cover?

Its scope is **/*. The alwaysApply: false setting means it is not configured for automatic use on every request.

Source text

nextjs-seo-dev-cursorrules-prompt-file.mdc · CC0-1.0
---
description: "Cursor rules for Next.js development with SEO optimization."
globs: **/*
alwaysApply: false
---
Always add helpful comments to the code explaining what you are doing.
Never delete old comments, unless they are no longer relevant because the code has been rewritten or deleted.

This is the package.json file for the nextjs app.

Whenever you see a line with this following comment, do not touch it, rewrite it, or delete it "Do not touch this line Cursor"

{
  "name": "@se-2/nextjs",
  "private": true,
  "version": "0.1.0",
  "scripts": {
    "dev": "next dev",
    "start": "next dev",
    "build": "next build",
    "serve": "next start",
    "lint": "next lint",
    "format": "prettier --write . '!(node_modules|.next|contracts)/*/'",
    "check-types": "tsc --noEmit --incremental",
    "vercel": "vercel",
    "vercel:yolo": "vercel --build-env NEXT_PUBLIC_IGNORE_BUILD_ERROR=true"
  },
  "dependencies": {
    "@heroicons/react": "^2.0.11",
    "@rainbow-me/rainbowkit": "2.1.2",
    "@tanstack/react-query": "^5.28.6",
    "@uniswap/sdk-core": "^4.0.1",
    "@uniswap/v2-sdk": "^3.0.1",
    "blo": "^1.0.1",
    "burner-connector": "^0.0.8",
    "daisyui": "4.5.0",
    "next": "^14.0.4",
    "next-themes": "^0.2.1",
    "nprogress": "^0.2.0",
    "qrcode.react": "^3.1.0",
    "react": "^18.2.0",
    "react-copy-to-clipboard": "^5.1.0",
    "react-dom": "^18.2.0",
    "react-hot-toast": "^2.4.0",
    "use-debounce": "^8.0.4",
    "usehooks-ts": "^2.13.0",
    "viem": "2.17.4",
    "wagmi": "2.10.10",
    "zustand": "^4.1.2"
  },
  "devDependencies": {
    "@trivago/prettier-plugin-sort-imports": "^4.1.1",
    "@types/node": "^17.0.35",
    "@types/nprogress": "^0",
    "@types/react": "^18.0.9",
    "@types/react-copy-to-clipboard": "^5.0.4",
    "@typescript-eslint/eslint-plugin": "^5.39.0",
    "abitype": "1.0.5",
    "autoprefixer": "^10.4.12",
    "eslint": "^8.15.0",
    "eslint-config-next": "^14.0.4",
    "eslint-config-prettier": "^8.5.0",
    "eslint-plugin-prettier": "^4.2.1",
    "postcss": "^8.4.16",
    "prettier": "^2.8.4",
    "tailwindcss": "^3.4.3",
    "type-fest": "^4.6.0",
    "typescript": "5.5.3",
    "vercel": "^32.4.1"
  }
}

© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules

Similar IDE rules

All IDE rules for Frontend and UI →

From the same set210

nextjs-tanstack-query Enforces architecture patterns for Next.js App Router with TanStack Query v5. Guides Cursor on cache hydration, Server Actions as mutations, and optimistic UI updates. ★ 41,024repo stars nextjs-tanstack-query-cursorrules-prompt-file A Cursor rule for Next.js App Router and TanStack Query v5, with cache hydration, Server Actions as mutations, and optimistic updates. ★ 41,024repo stars nextjs-tailwind-typescript-apps-cursorrules-prompt A Cursor rule that points the assistant at Next.js, Tailwind CSS and TypeScript. It sets the working order: plan in pseudocode first, code after. ★ 41,024repo stars nextjs-supabase-shadcn-pwa-cursorrules-prompt-file Defines Next.js 15+, Supabase, and Shadcn UI conventions for Cursor. It caps files at 150 lines and enforces task logging in project docs. ★ 41,024repo stars nextjs-react-typescript-cursorrules-prompt-file A Cursor rule that tells the agent how to write code in Next.js 14 App Router, React and TypeScript projects. ★ 41,024repo stars nextjs-react-tailwind-cursorrules-prompt-file Sets coding instructions for Next.js App Router, React, Tailwind CSS, and Shadcn UI. Enforces React Server Components and a clean file layout in Cursor. ★ 41,024repo stars nextjs-material-ui-tailwind-css-cursorrules-prompt A Cursor rule for Next.js projects using TypeScript, Tailwind CSS, Material UI, and App Router. It fits projects built around this stack. ★ 41,024repo stars nextjs-app-router-cursorrules-prompt-file A Cursor rule that hands the agent a set of Next.js App Router habits: server components by default, file-based routing, separate files for loading and errors. ★ 41,024repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor