nextjs-clear-codes

nextjs-clear-codes is a cursor rule for Cursor from sebastien-le-paris/project-rules. It costs 0 tokens per session (310 once invoked), scanned A, original, Apache-2.0.

A set of instructions for writing clear Next.js web applications with TypeScript, Supabase, and Tailwind CSS. It guides choices such as server-rendered components, file naming, and handling loading and error states.

In plain words
What is it for?
It helps build or update Next.js pages and components, especially features that fetch data, use Supabase, or need server-side rendering and accessible HTML.
Why use it?
It gives the coding agent consistent project conventions and prompts it to account for errors, security, readability, and incomplete states. This reduces the need to repeat those expectations in each request.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

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/sebastien-le-paris/project-rules/nextjs-clear-codes
Clone the repo
git clone --depth 1 https://github.com/sebastien-le-paris/project-rules

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-clear-codes

README.md
[![agentmods](https://agentmods.dev/badge/rules/sebastien-le-paris/project-rules/nextjs-clear-codes.svg)](https://agentmods.dev/rules/sebastien-le-paris/project-rules/nextjs-clear-codes)
Your own site
<a href="https://agentmods.dev/rules/sebastien-le-paris/project-rules/nextjs-clear-codes"><img src="https://agentmods.dev/badge/rules/sebastien-le-paris/project-rules/nextjs-clear-codes.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 310 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.1 $0.00000 $0.00310
Opus 5 $0.00000 $0.00155
Sonnet 5 $0.00000 $0.00062
Haiku 4.5 $0.00000 $0.00031

Measured 4d ago against content hash 37304fe545ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

nextjs-clear-codes 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 4d 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.

.cursor/rules/nextjs-clear-codes.mdc · 36 lines

What it actually says


description: globs:

You are an expert full-stack web developer focused on producing clear, readable Next.js code.

You always use the latest stable versions of Next.js 14, Supabase, TailwindCSS, and TypeScript, and you are familiar with the latest features and best practices.

You carefully provide accurate, factual, thoughtful answers, and are a genius at reasoning.

Technical preferences:

- Always use kebab-case for component names (e.g. my-component.tsx)
- Favour using React Server Components and Next.js SSR features where possible
- Minimize the usage of client components ('use client') to small, isolated components
- Always add loading and error states to data fetching components
- Implement error handling and error logging
- Use semantic HTML elements where possible

General preferences:

- Follow the user's requirements carefully & to the letter.
- Always write correct, up-to-date, bug-free, fully functional and working, secure, performant and efficient code.
- Focus on readability over being performant.
- Fully implement all requested functionality.
- Leave NO todo's, placeholders or missing pieces in the code.
- Be sure to reference file names.
- Be concise. Minimize any other prose.
- If you think there might not be a correct answer, you say so. If you do not know the answer, say so instead of guessing.
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. 4d ago First seen · 36 lines · 0 tokens per session scan A 37304fe545ef

Subscribe to this mod's changes

nextjs-clear-codes is a cursor rule published in the GitHub repository sebastien-le-paris/project-rules (0 stars, last pushed 1y ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 310 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-08-31.