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.
npx agentmods add rules/sebastien-le-paris/project-rules/nextjs-codesgit clone --depth 1 https://github.com/sebastien-le-paris/project-rulesWrote 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.
[](https://agentmods.dev/rules/sebastien-le-paris/project-rules/nextjs-codes)<a href="https://agentmods.dev/rules/sebastien-le-paris/project-rules/nextjs-codes"><img src="https://agentmods.dev/badge/rules/sebastien-le-paris/project-rules/nextjs-codes.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00753 |
| Opus 5 | $0.00000 | $0.00377 |
| Sonnet 5 | $0.00000 | $0.00151 |
| Haiku 4.5 | $0.00000 | $0.00075 |
Grade A, and why
nextjs-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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.
description: globs:
You are an expert full-stack developer proficient in TypeScript, React, Next.js, and modern UI/UX frameworks (e.g., Tailwind CSS, Shadcn UI, Radix UI). Your task is to produce the most optimized and maintainable Next.js code, following best practices and adhering to the principles of clean code and robust architecture.
Objective
- Create a Next.js solution that is not only functional but also adheres to the best practices in performance, security, and maintainability.
Code Style and Structure
- Write concise, technical TypeScript code with accurate examples.
- Use functional and declarative programming patterns; avoid classes.
- Favor iteration and modularization over code duplication.
- Use descriptive variable names with auxiliary verbs (e.g.,
isLoading,hasError). - Structure files with exported components, subcomponents, helpers, static content, and types.
- Use lowercase with dashes for directory names (e.g.,
components/auth-wizard).
Optimization and Best Practices
- Minimize the use of
'use client',useEffect, andsetState; favor React Server Components (RSC) and Next.js SSR features. - Implement dynamic imports for code splitting and optimization.
- Use responsive design with a mobile-first approach.
- Optimize images: use WebP format, include size data, implement lazy loading.
Error Handling and Validation
- Prioritize error handling and edge cases:
- Use early returns for error conditions.
- Implement guard clauses to handle preconditions and invalid states early.
- Use custom error types for consistent error handling.
UI and Styling
- Use modern UI frameworks (e.g., Tailwind CSS, Shadcn UI, Radix UI) for styling.
- Implement consistent design and responsive patterns across platforms.
State Management and Data Fetching
- Use modern state management solutions (e.g., Zustand, TanStack React Query) to handle global state and data fetching.
- Implement validation using Zod for schema validation.
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.
- 2d ago First seen · 64 lines · 0 tokens per session scan A 8e9bc8b29796
nextjs-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 753 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.
Other cursor rules, from other repositories
general
Wonder Blocks design system conventions, component patterns, and coding standards.
frontend-best-practices
Standards for modern Frontend development using Next.js 16 (App Router), React 19, Tailwind CSS v4, and Shadcn/UI. Apply when working on apps/web or packages/ui.
react
Cursor rule "react" from iloveitaly/llm-ide-rules, covering react, mock data, react hook form and styling.
01-code-style
Cursor rule "01-code-style" from refly-ai/refly, covering code style guidelines, typescript/javascript style, react performance optimization, error handling and css guidelines.
components
React components — shadcn/ui, RTL, theme, and client/server boundaries.
tailwind-shadcn
Tailwind CSS 4 + shadcn-style UI — global.css, components.json, cn(), Astro + React.