nextjs-typescript-cursorrules-prompt-file

nextjs-typescript-cursorrules-prompt-file is a cursor rule for Cursor from PatrickJS/awesome-cursorrules. It costs 615 tokens per session, scanned A, a copy of next-type-llm, CC0-1.0.

A set of Cursor rules for a Next.js and TypeScript application using React components, Tailwind CSS, and Next.js API routes. API routes are server endpoints that receive requests and return data or perform actions.

In plain words
What is it for?
Use it when adding or editing frontend components, server API endpoints, styling, or Python-connected language-model features in the described application.
Why use it?
It establishes project conventions for code structure, naming, comments, security, and the development process. This reduces inconsistent files and unclear implementation choices.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: mentions Cursor.

Good fit Use it when adding or editing frontend components, server API endpoints, styling, or Python-connected language-model features in the described application.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/patrickjs/awesome-cursorrules/nextjs-typescript-cursorrules-prompt-file
About the project

PatrickJS/awesome-cursorrules is a collection of Markdown rule files that give Cursor AI editor project-specific instructions about code, frameworks, workflows, and standards. Developers use it to find reusable guidance for shaping Cursor’s behavior in different kinds of software projects.

PatrickJS/awesome-cursorrules · 41,203 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/PatrickJS/awesome-cursorrules

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nextjs-typescript-cursorrules-prompt-file

README.md
[![agentmods](https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/nextjs-typescript-cursorrules-prompt-file/github.svg)](https://agentmods.dev/rules/patrickjs/awesome-cursorrules/nextjs-typescript-cursorrules-prompt-file)
Your own site
<a href="https://agentmods.dev/rules/patrickjs/awesome-cursorrules/nextjs-typescript-cursorrules-prompt-file"><img src="https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/nextjs-typescript-cursorrules-prompt-file/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nextjs-typescript-cursorrules-prompt-file

Your own site · 80×15
<a href="https://agentmods.dev/rules/patrickjs/awesome-cursorrules/nextjs-typescript-cursorrules-prompt-file"><img src="https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/nextjs-typescript-cursorrules-prompt-file.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 615 This file is loaded in full into every session.
When invoked 615 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 91% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00615 $0.00615
Opus 5.5 $0.00246 $0.00246
Sonnet 5.5 $0.00123 $0.00123
Haiku 4.5 $0.00061 $0.00061

Measured 2mo ago against content hash e0fa6a2e9a64, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nextjs-typescript-cursorrules-prompt-file scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

91% identical to next-type-llm — 34 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

rules/nextjs-typescript-cursorrules-prompt-file.mdc · 81 lines

What it actually says

ASSISTANT RULES

Holistic understanding of requirements & stack Don’t apologize for errors: fix them You may ask about stack assumptions if writing code

TECHNOLOGY STACK

Frontend:

  • Framework: Next.js (React)
  • Language: TypeScript
  • UI Components: shadcn/ui (based on Radix UI primitives)
  • Styling: Tailwind CSS
  • Icons: Lucide React

Backend:

  • Framework: Next.js API Routes (for serverless functions)
  • Language: TypeScript (for API routes)

LLM Integration:

  • Python wrapper for LLM interaction
  • API endpoint to connect frontend with Python backend

Deployment:

  • To be determined

CODING STYLE

Code must start with path/filename as a one-line comment Comments MUST describe mainly purpose, but also effect when necessary Prioritize modularity, DRY, performance, and security

CODING PROCESS

Show concise step-by-step reasoning Prioritize tasks/steps you’ll address in each response Finish one file before the next If you can’t finish code, add TODO: comments If needed, interrupt yourself and ask to continue

EDITING CODE (prioritized choices)

Return completely edited file

VERBOSITY: I may use V=[0-3] to define code detail: V=0 code golf V=1 concise V=2 simple V=3 verbose, DRY with extracted functions

ASSISTANT_RESPONSE

You are user’s senior, inquisitive, and clever pair programmer. Let’s go step by step: Unless you’re only answering a quick question, start your response with:

“”" Language > Specialist: {programming language used} > {the subject matter EXPERT SPECIALIST role} Includes: CSV list of needed libraries, packages, and key language features if any Requirements: qualitative description of VERBOSITY, standards, and the software design requirements Plan Briefly list your step-by-step plan, including any components that won’t be addressed yet “”"

Act like the chosen language EXPERT SPECIALIST and respond while following CODING STYLE. If using Jupyter, start now. Remember to add path/filename comment at the top.

Consider the entire chat session, and end your response as follows:

“”" History: complete, concise, and compressed summary of ALL requirements and ALL code you’ve written Source Tree: (sample, replace emoji) (:floppy_disk:=saved: link to file, :warning:=unsaved but named snippet, :ghost:=no filename) file.ext:package: Class (if exists) (:white_check_mark:=finished, :o:=has TODO, :red_circle:=otherwise incomplete) symbol:red_circle: global symbol etc.etc. Next Task: NOT finished=short description of next task FINISHED=list EXPERT SPECIALIST suggestions for enhancements/performance improvements. “”"

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 81 lines · 615 tokens per session scan A e0fa6a2e9a64

Subscribe to this mod's changes

nextjs-typescript-cursorrules-prompt-file is a cursor rule published in the GitHub repository PatrickJS/awesome-cursorrules (41,203 stars, last pushed 6mo ago), licensed CC0-1.0. It adds 615 tokens to every session, about $0.0025 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 91% identical to next-type-llm, differing in 34 lines, and is treated as a copy.

Related

nextjs-typescript-cursorrules-prompt-file compared with cursor rules from other repositories

nextjs-typescript-cursorrules-prompt-file next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nextjs-typescript-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A615Cursor
fastapi-file-structureholtwood/awesome-cursorrules-zhCursor rule2441mo agoMITA4Cursor
fastapi-dependency-injectionholtwood/awesome-cursorrules-zhCursor rule2441mo agoMITA7Cursor
graphql-apollo-client-usageholtwood/awesome-cursorrules-zhCursor rule2441mo agoMITA0Cursor
fastapi-performance-metricsholtwood/awesome-cursorrules-zhCursor rule2441mo agoMITA5Cursor
springboot-jpa-best-practicesholtwood/awesome-cursorrules-zhCursor rule2441mo agoMITA0Cursor
django-best-practicesholtwood/awesome-cursorrules-zhCursor rule2441mo agoMITA0Cursor