next-type-llm

next-type-llm is a cursor rule for coding agents from PatrickJS/awesome-cursorrules. It costs 0 tokens per session (624 once invoked), scanned A, original, CC0-1.0.

A set of Cursor instructions for building Next.js web applications with TypeScript and a Python-based connection to large language models (LLMs), which generate or process text.

In plain words
What is it for?
Use it when creating or changing Next.js pages, API routes, interfaces, and LLM-backed features that connect to a Python service.
Why use it?
It gives the coding agent a defined technology stack, file-editing style, and workflow so generated code stays consistent across the project.

Cursor rule

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 · 40,722 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.

agentmods
npx agentmods add rules/patrickjs/awesome-cursorrules/next-type-llm
Clone the repo
git clone --depth 1 https://github.com/PatrickJS/awesome-cursorrules

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 next-type-llm

README.md
[![agentmods](https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/next-type-llm.svg)](https://agentmods.dev/rules/patrickjs/awesome-cursorrules/next-type-llm)
Your own site
<a href="https://agentmods.dev/rules/patrickjs/awesome-cursorrules/next-type-llm"><img src="https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/next-type-llm.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 624 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00000 $0.00624
Opus 5 $0.00000 $0.00312
Sonnet 5 $0.00000 $0.00125
Haiku 4.5 $0.00000 $0.00062

Measured yesterday against content hash b32f2e62b926, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

next-type-llm 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 yesterday.

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

Copies of this mod

1 near-identical copy found in the catalogue:

rules/next-type-llm.mdc · 107 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. “”"

Author

dlje

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. yesterday First seen · 107 lines · 624 tokens per session scan A b32f2e62b926

Subscribe to this mod's changes

next-type-llm is a cursor rule published in the GitHub repository PatrickJS/awesome-cursorrules (40,722 stars, last pushed 3mo ago), licensed CC0-1.0. It costs nothing until one of its globs matches a file; then it loads 624 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.