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.
git clone --depth 1 https://github.com/Luxvil/ai-coding-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/luxvil/ai-coding-rules/67-stack-nextjs15)<a href="https://agentmods.dev/rules/luxvil/ai-coding-rules/67-stack-nextjs15"><img src="https://agentmods.dev/badge/rules/luxvil/ai-coding-rules/67-stack-nextjs15/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.
<a href="https://agentmods.dev/rules/luxvil/ai-coding-rules/67-stack-nextjs15"><img src="https://agentmods.dev/badge/rules/luxvil/ai-coding-rules/67-stack-nextjs15.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00000 | $0.02027 |
| Opus 5.5 | $0.00000 | $0.00811 |
| Sonnet 5.5 | $0.00000 | $0.00405 |
| Haiku 4.5 | $0.00000 | $0.00203 |
Grade A, and why
67-stack-nextjs15 scanned grade A with 1 finding 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 3mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
fetch(url); This is a copy
100% identical to 67-stack-nextjs15 — 0 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.
How it starts
The opening of the file, as written. The whole thing — 368 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Next.js 15 App Router Rules
This module covers Next.js 15+ with App Router. For Pages Router, use general React rules.
Component Strategy
Server vs Client Components
| Type | Default | Directive | Use When |
|---|---|---|---|
| Server Component | ✅ Yes | None needed | Data fetching, no interactivity |
| Client Component | No | 'use client' |
Hooks, events, browser APIs |
Decision Tree
Does this component need...
├── useState/useEffect/useContext? → Client Component
├── onClick/onChange/onSubmit? → Client Component
├── window/document/localStorage? → Client Component
├── Only data fetching? → Server Component ✅
└── Only rendering props? → Server Component ✅
Placement Rules
// ✅ Server Component (default)
// No directive needed
async function UserProfile({ userId }: { userId: string }) {
const user = await getUser(userId); // Direct DB/API call
return <div>{user.name}</div>;
}
// ✅ Client Component (when needed)
'use client';
import { useState } from 'react';
function Counter() {
const [count, setCount] = useState(0);
return <button onClick={() => setCount(c => c + 1)}>{count}</button>;
}
Data Fetching
Parallel Fetching (CRITICAL)
// ❌ BAD: Waterfall — each awaits the previous
async function Page() {
const user = await getUser(); // 100ms
const posts = await getPosts(); // 100ms
const comments = await getComments(); // 100ms
// Total: 300ms
}
// ✅ GOOD: Parallel — all run simultaneously
async function Page() {
const [user, posts, comments] = await Promise.all([
getUser(), // 100ms
getPosts(), // 100ms
getComments() // 100ms
]);
// Total: ~100ms
}
Streaming with Suspense
import { Suspense } from 'react';
async function Page() {
return (
<div>
<h1>Dashboard</h1>
{/* Instantly visible */}
<Suspense fallback={<LoadingSkeleton />}>
<SlowComponent />
{/* Streams in when ready */}
</Suspense>
</div>
);
}
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.
- 3mo ago First seen · 368 lines · 0 tokens per session scan A 8eb06b1dfd1d
67-stack-nextjs15 is a cursor rule published in the GitHub repository Luxvil/ai-coding-rules (3 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,027 tokens. A static security scan graded it A with 1 finding (makes network calls). It is 100% identical to 67-stack-nextjs15, differing in 0 lines, and is treated as a copy.
67-stack-nextjs15 compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| 67-stack-nextjs15Luxvil/ai-coding-rules | Cursor rule | 3 | 2mo ago | MIT | A | 0 | Cursor |
| exam-answer-formatthehimel/cursor-rules-and-prompts | Cursor rule | 250 | 3mo ago | none | A | 2,608 | Cursor |
| short-answer-versionthehimel/cursor-rules-and-prompts | Cursor rule | 250 | 3mo ago | none | A | 12 | Cursor |
| documentation-formattingthehimel/cursor-rules-and-prompts | Cursor rule | 250 | 3mo ago | none | A | 1,398 | Cursor |
| lecture-reference-linkingthehimel/cursor-rules-and-prompts | Cursor rule | 250 | 3mo ago | none | A | 1,403 | Cursor |
| mermaid-diagramsthehimel/cursor-rules-and-prompts | Cursor rule | 250 | 3mo ago | none | A | 16 | Cursor |
| human-writing-stylethehimel/cursor-rules-and-prompts | Cursor rule | 250 | 3mo ago | none | A | 1,007 | Cursor |