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 hoangatg/ai-agent-toolkit --skill nextjs-app-routergit clone --depth 1 https://github.com/hoangatg/ai-agent-toolkitWrote 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/hoangatg/ai-agent-toolkit/nextjs-app-router)<a href="https://agentmods.dev/skills/hoangatg/ai-agent-toolkit/nextjs-app-router"><img src="https://agentmods.dev/badge/skills/hoangatg/ai-agent-toolkit/nextjs-app-router/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/hoangatg/ai-agent-toolkit/nextjs-app-router"><img src="https://agentmods.dev/badge/skills/hoangatg/ai-agent-toolkit/nextjs-app-router.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.00040 | $0.01057 |
| Opus 5 | $0.00020 | $0.00528 |
| Sonnet 5 | $0.00008 | $0.00211 |
| Haiku 4.5 | $0.00004 | $0.00106 |
Grade A, and why
nextjs-app-router 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 7d 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 — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Next.js App Router
Server-first React. Less JavaScript, faster pages.
1. Core Concepts
Server vs Client Components
| Feature | Server Component (default) | Client Component ("use client") |
|---|---|---|
| Rendering | Server only | Server + Client hydration |
| JS bundle | Zero | Included in bundle |
| Data fetching | Direct DB/API access | useEffect or React Query |
| State/Effects | ❌ No hooks | ✅ useState, useEffect |
| Event handlers | ❌ No onClick | ✅ Full interactivity |
| Best for | Static content, data display | Interactive UI, forms |
Rule: Everything is a Server Component unless it needs interactivity. Push
"use client"as far down the tree as possible.
2. Routing
File Conventions
| File | Purpose |
|---|---|
page.tsx |
Route UI |
layout.tsx |
Shared layout (persists across navigations) |
loading.tsx |
Streaming fallback |
error.tsx |
Error boundary |
not-found.tsx |
404 page |
route.ts |
API endpoint |
Route Groups & Parallel Routes
| Pattern | Syntax | Use Case |
|---|---|---|
| Route Group | (group) |
Organize without URL impact |
| Parallel | @slot |
Multiple views on same page |
| Intercepting | (.), (..) |
Modal patterns |
| Dynamic | [slug] |
Parameterized routes |
| Catch-all | [...slug] |
Flexible matching |
3. Data Fetching
Patterns
| Pattern | Where | Caching |
|---|---|---|
fetch() in Server Component |
Server | Cached by default |
| Server Action | Server | No cache |
| React Query | Client | Client cache |
unstable_cache |
Server | Manual cache |
Caching Strategy
| Cache Layer | Default | Override |
|---|---|---|
| Request memoization | ON | Per request |
| Data cache | ON | revalidate option |
| Full route cache | ON (static) | dynamic = 'force-dynamic' |
| Router cache | ON | revalidatePath(), revalidateTag() |
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.
- 7d ago First seen · 149 lines · 40 tokens per session scan A b926710bd1fb
nextjs-app-router is a skill published in the GitHub repository hoangatg/ai-agent-toolkit (1 stars, last pushed 5mo ago), licensed MIT. It adds 40 tokens to every session and 1,057 once invoked, about $0.0002 per session on Opus 5. 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.
Other skills, from other repositories
frontend-patterns
Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.
coding-standards
Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.
ss-studio
Turn a product brief and optional references into three distinct creative directions, a human-selected StyleSeed interaction plan, generated image/video asset jobs, a working UI prototype, and a verified prototype-first showcase reel. Use for client concepts, app interaction exploration, trendy but coherent UI…
ss-component
Generate a new UI component following the StyleSeed design conventions.
ss-lint
Quick automated lint — detects common design system violations in seconds.
react-web
React web development with hooks, React Query, Zustand.