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 skills add event4u-app/agent-config --skill nextjs-patternsgit clone --depth 1 https://github.com/event4u-app/agent-configWrote 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/skills/event4u-app/agent-config/nextjs-patterns)<a href="https://agentmods.dev/skills/event4u-app/agent-config/nextjs-patterns"><img src="https://agentmods.dev/badge/skills/event4u-app/agent-config/nextjs-patterns/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/skills/event4u-app/agent-config/nextjs-patterns"><img src="https://agentmods.dev/badge/skills/event4u-app/agent-config/nextjs-patterns.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.00037 | $0.02529 |
| Opus 5.5 | $0.00015 | $0.01012 |
| Sonnet 5.5 | $0.00007 | $0.00506 |
| Haiku 4.5 | $0.00004 | $0.00253 |
Grade A, and why
nextjs-patterns 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 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
`fetch(url, { next: { tags: ['posts'] } })` then `revalidateTag('posts')`. How it starts
The opening of the file, as written. The whole thing — 213 lines — stays where its author put it; the contents beside it link to each section on GitHub.
nextjs-patterns
Compatibility
- Tested against: Next.js
14.xand15.x(App Router), React18+/19+. - Pages Router is out of scope. On a Pages-Router project (no
app/), fall back to plain React skills; ask before introducing App Router.
When to use
Use this skill for Next.js-specific code generation and editing on the App Router:
- Server Components (RSC) and Client Components (
"use client") - Server Actions (
"use server") - Route Handlers (
app/api/**/route.ts) - Layouts, templates, loading / error / not-found boundaries
- Data fetching with
fetch+ cache directives revalidatePath/revalidateTaginvalidation- Streaming and
<Suspense>boundaries - Middleware (
middleware.ts) - Metadata API (static + dynamic)
- Route Groups, Parallel Routes, Intercepting Routes
When to use the analysis sibling
When the task is understanding how a Next.js app boots, where the
server/client boundary lives, what is cached vs streamed, or why a
hydration mismatch fires — defer to project-analysis-nextjs first,
then return here for the edit.
Procedure: write Next.js code
- Confirm App Router —
app/directory exists;next.config.{js,ts,mjs}present. - Confirm version —
package.jsonmajor fornext. 14.x vs 15.x differs in default caching (15.x is uncached by default forfetch) and incookies()/headers()being async. - Inspect routing layout — flat
app/vs grouped (app/(marketing)/,app/(app)/); identify shared layouts and parallel routes. - Inspect data layer — Server Actions vs route handlers vs external API; ORM (Prisma, Drizzle) or fetch-based.
- Inspect styling — Tailwind, CSS Modules, or styled engine; respect the chosen stack, do not mix.
- Check test conventions — Vitest / Jest + RTL for components; Playwright
for E2E; route-handler tests via
noderuntime.
Server vs Client boundary
- Server Components are the default. Add
"use client"only when a leaf component needs state, effects, browser APIs, or event handlers. - The
"use client"boundary is viral upward at the import graph, but you can keep a Server Component rendered as a child of a Client Component by passing it as a prop /children— that pattern keeps server logic out of the client bundle. - Never put database access, secrets, or server-only modules inside a Client
Component or a file imported by one. Use
import "server-only"at the top of a server module to make leaks fail at build time. - Symmetric guard:
import "client-only"for code that must never run on the server (e.g. browser-only SDKs). - Props passed from Server → Client must be serializable. No functions, no
Dates with custom prototypes, no
Map/Set— use plain JSON.
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.
- 2mo ago First seen · 213 lines · 37 tokens per session scan A 03b67ad5dc35
nextjs-patterns is a skill published in the GitHub repository event4u-app/agent-config (19 stars, last pushed yesterday), licensed MIT. It adds 37 tokens to every session and 2,529 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
nextjs-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| nextjs-patternsevent4u-app/agent-config | Skill | 19 | yesterday | MIT | A | 37 | Claude Code, Codex |
| frontendcode-yeongyu/oh-my-openagent | Skill | 71k | yesterday | none | A | 79 | Claude Code, Codex |
| cometchat-react-v7-corecometchat/cometchat-skills | Skill | 162 | 22d ago | MIT | A | 94 | Claude Code |
| shadcnPyModel/react-frontend-skills | Skill | 42 | 3d ago | MIT | A | 16 | Claude Code, Codex |
| cometchat-react-v7-migrationcometchat/cometchat-skills | Skill | 162 | 22d ago | MIT | A | 160 | Claude Code |
| lov-video-chapter-designlovstudio/skills | Skill | 72 | 3d ago | MIT | A | 51 | Claude Code |
| front-vitestlouisbrulenaudet/monorepo-template | Skill | 19 | 5d ago | Apache-2.0 | A | 100 | Claude Code, Codex |