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 skills/g1joshi/agent-skills/nextjsnpx skills add G1Joshi/Agent-Skills --skill nextjsgit clone --depth 1 https://github.com/G1Joshi/Agent-SkillsWrote 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/g1joshi/agent-skills/nextjs)<a href="https://agentmods.dev/skills/g1joshi/agent-skills/nextjs"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-skills/nextjs.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.1 | $0.00023 | $0.00543 |
| Opus 5 | $0.00012 | $0.00271 |
| Sonnet 5 | $0.00005 | $0.00109 |
| Haiku 4.5 | $0.00002 | $0.00054 |
Grade A, and why
nextjs 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 — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Next.js
Next.js is the leading full-stack framework for React. Next.js 15 (2025) stabilizes the App Router and Server Actions, making it a robust platform for modern web apps.
When to Use
- Full-Stack React: You need API routes, DB access, and UI in one codebase.
- SEO Critical: Server-Side Rendering (SSR) is first-class.
- Vercel Ecosystem: seamless deployment to Vercel's edge network.
Quick Start (App Router)
// app/page.tsx (Server Component by default)
import { db } from "@/lib/db";
export default async function Page() {
const posts = await db.post.findMany(); // Direct DB access!
return (
<main>
<h1>Blog</h1>
{posts.map((post) => (
<p key={post.id}>{post.title}</p>
))}
</main>
);
}
Core Concepts
App Router (app/ dir)
File-system based routing where page.tsx is the UI, layout.tsx wraps children, and loading.tsx defines Suspense boundaries.
Server Components (RSC)
Components in app/ are Server Components by default. They can't use useState or useEffect. To add interactivity, add 'use client' to the top of a file.
Server Actions
Functions that run on the server, callable from the client (forms, buttons).
// actions.ts
'use server'
export async function create(formData) {
await db.post.create({ data: ... });
}
Best Practices (2025)
Do:
- Fetch in Server Components: Fetch data directly in your content (async components). No
useEffect. - Use
revalidatePath: Revalidate cache on-demand after mutations (Server Actions). - Partial Prerendering (PPR): (Experimental in '24, Stable in '25) Mix static shell with dynamic holes.
Don't:
- Don't leak secrets: Ensure
'use server'files don't export sensitive data. - Don't
use clienteverything: Only put'use client'at the leaves of your tree (buttons, inputs). Keep high-level layouts as Server Components.
References
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 · 74 lines · 23 tokens per session scan A e4f168d4af1d
nextjs is a skill published in the GitHub repository G1Joshi/Agent-Skills (12 stars, last pushed 6mo ago), licensed MIT. It adds 23 tokens to every session and 543 once invoked, about $0.0001 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
react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. Use when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements. Do NOT use…
react-composition-patterns
React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes. Do NOT…
component-design
Design reusable React components with compound patterns, controlled/uncontrolled hybrids, typed prop APIs, async state handling, and ARIA accessibility. Use when the user creates, refactors, or reviews React components, or mentions props, hooks, .tsx files, component APIs, or accessible UI patterns.
navigation-patterns
When designing app navigation, implementing deep linking, or handling auth flows.
tauri-rust-and-frontend-desktop
Architectural patterns, security IPC, performance optimization, native integration, and production best practices for building cross-platform desktop applications using Tauri (v2) and Rust with modern web frontends (React, Svelte, Vue). Use when designing, building, or optimizing Tauri desktop apps.
ui-styling
Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs. Use when building user interfaces, implementing design systems, creating responsive layouts, adding accessible components (dialogs, dropdowns…