nextjs-patterns

nextjs-patterns is a skill for Claude Code, Codex from tranhieutt/software_development_department. It costs 53 tokens per session (905 once invoked), scanned A, original, MIT.

A set of patterns for building Next.js applications with the App Router, React components, TypeScript, and Tailwind CSS.

In plain words
What is it for?
Use it when building pages, layouts, routes, data loading, forms, metadata, or performance improvements in Next.js.
Why use it?
It helps you choose between server and browser code, organize routes, fetch and cache data, and handle common Next.js architecture decisions.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/tranhieutt/software_development_department/nextjs-patterns
Any agent
npx skills add tranhieutt/software_development_department --skill nextjs-patterns
Clone the repo
git clone --depth 1 https://github.com/tranhieutt/software_development_department

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for nextjs-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/tranhieutt/software_development_department/nextjs-patterns.svg)](https://agentmods.dev/skills/tranhieutt/software_development_department/nextjs-patterns)
Your own site
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/nextjs-patterns"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/nextjs-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 905 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.00905
Opus 5 $0.00026 $0.00452
Sonnet 5 $0.00011 $0.00181
Haiku 4.5 $0.00005 $0.00090

Measured 2d ago against content hash f5d0a47b9b87, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

nextjs-patterns 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.

.claude/skills/nextjs-patterns/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Next.js Development Patterns

Comprehensive patterns and best practices for Next.js 14+ / 15+ App Router architecture, Server Components, and modern full-stack React development.


1. Foundational Principles

Server vs Client Components

  • Server (Default): Use for data fetching, layouts, and static content.
  • Client ('use client'): Use for interactivity (useState, useEffect), event handlers, and browser-only APIs.
  • Decision Rule: Stay on the server as long as possible. Split components so the interactive "leaf nodes" are client-side while the data-heavy "branch nodes" remain on the server.

Routing & Organization

  • App Router: Use the app/ directory for file-based routing.
  • Route Groups: (group-name) for organization without affecting URL structure.
  • Special Files: page.tsx, layout.tsx, loading.tsx, error.tsx, not-found.tsx.
  • Advanced Routing: Parallel routes (@slot) and Intercepting routes ((.)).

2. Data Fetching & Caching

Strategy Matrix

Pattern Use Case Implementation
Static Blog posts, marketing Cached at build time
ISR Products, news revalidate: 60
Dynamic User dashboards, search no-store or force-dynamic

Patterns

  • Server Fetching: Fetch data directly in Server Components using async/await.
  • Streaming: Use Suspense and loading.tsx to stream UI to the client.
  • Server Actions: Perform mutations with use server functions. Validate with Zod.

3. 8-Phase Development Workflow

Phase 1: Project Setup

Scaffold with @app-builder, configure TypeScript, and set up ESLint/Prettier.

Phase 2: Component Architecture

Design hierarchy and implement base layout components using @frontend-developer and @react-patterns.

Phase 3: Styling & Design

Configure Tailwind CSS v4 and design tokens using @tailwind-patterns and @frontend-design.

Phase 4: Data Fetching

Implement Server Component data fetching and set up React Query/SWR if client-side fetching is needed.

Read the full file on GitHub · 92 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 2d ago First seen · 92 lines · 53 tokens per session scan A f5d0a47b9b87

Subscribe to this mod's changes

nextjs-patterns is a skill published in the GitHub repository tranhieutt/software_development_department (71 stars, last pushed 3mo ago), licensed MIT. It adds 53 tokens to every session and 905 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

nextjs

Skill "nextjs" from DongDuong2001/pudo-code-system, covering next.js 15 (app router) pudo checklist, 1. plan (architecture & strategy), 2. understand (context & auditing), 3. develop (implementation) and 4. optimize (performance & review).

DongDuong2001/pudo-code-system · 0 tokens

data-vis-coding-v2

建立「互動式資料視覺化應用」的完整工作流程 skill。從一份資料(CSV/JSON/GeoJSON)與需求出發, 走完 規格釐清 → 資料處理 → 圖表選型 → 元件實作 → 多層次驗證,產出「可運作、能互動、數值正確、 風格一致」的 React + Tailwind + Chart.js/D3 前端。核心是「內容與樣式分離」兩階段設計,並以實際 執行 + 數值校驗取代臆測,避免資料錯置與視覺幻覺。 Use whenever the user wants to build or scaffold an interactive data-visualization app / dashboard / chart /…

hsuan1012/Dataviz-Coding-Agent · 327 tokens

extract-source-sample

Given the path to a finished content-goose ad-run folder, extract everything that defines that ad — recipe shot list, VO script, characters, voices, world, atom-skills, master mp4 — and emit a source-sample.json in the exact shape the upload-ad-sample skill writes to the Goose Ads library. Also links every character…

gooseworks-ai/goose-skills · 160 tokens

frontend

Builds, styles, and polishes web UI and UX. Use for any frontend, page, component, styling, layout, animation, or visual-quality task, or when asked to make an interface look or feel a certain way.

code-yeongyu/oh-my-openagent · 49 tokens

shadcn-ui

Install and configure shadcn/ui components for React projects. Guides component selection, installation order, dependency management, customisation with semantic tokens, and common UI recipes (forms, data tables, navigation, modals). Use after tailwind-theme-builder has set up the theme infrastructure, when adding…

jezweb/claude-skills · 77 tokens

typescript-dev

Builds full-stack TypeScript apps with Vite 8, React 19, Tailwind CSS v4, shadcn/ui, Biome, Vitest, and Hono. Covers the frontend (Vite/Rolldown build and dev server, type-safe React 19, strict TypeScript 6.0, Tailwind/shadcn styling, Biome lint/format, Vitest) and the Hono 4 backend/edge layer (routing, middleware…

tenequm/skills · 178 tokens