[TERMINAL · SKILLS]
> mounting /skills...
> indexing 295 manifests...
> linking agents: claude · codex · gemini · cursor
> ready.
[░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0%
Terminal.skills
Skills/nextjs
>

nextjs

Assists with building production-grade React applications using Next.js. Use when working with the App Router, Server Components, Server Actions, Middleware, or deploying to Vercel or self-hosted environments. Trigger words: nextjs, next.js, app router, server components, server actions, react framework, ssr, isr.

#nextjs#react#full-stack#ssr#server-components
terminal-skillsv1.0.0
Works with:claude-codeopenai-codexgemini-clicursor
Source
Trust Score
93/ 100
1.16×
Impact

Validation

Quality
93/ 100
Does it follow best practices?
5 PASS · 1 WEAK
Security
Passed
No known issues
Content review + injection scan
Impact
1.16×
73% → 85% agent success
Avg across 3 eval scenarios
Scored 5/13/2026 · skill v1.0.0
$
✓ Installed nextjs v1.0.0

Getting Started

  1. Install the skill using the command above
  2. Open your AI coding agent (Claude Code, Codex, Gemini CLI, or Cursor)
  3. Reference the skill in your prompt
  4. The AI will use the skill's capabilities automatically

Example Prompts

  • "Review the open pull requests and summarize what needs attention"
  • "Generate a changelog from the last 20 commits on the main branch"

Documentation

Overview

Next.js is a full-stack React framework featuring the App Router with Server Components, Server Actions for mutations, and multiple rendering strategies (SSG, SSR, ISR, PPR). It provides automatic code splitting, image optimization, and deployment options from Vercel to self-hosted Docker.

Instructions

  • When creating routes, use file-based routing in the app/ directory with page.tsx for pages, layout.tsx for persistent layouts, loading.tsx for streaming, and error.tsx for error boundaries.
  • When building components, default to Server Components (no directive needed) for zero client-side JavaScript, and add "use client" only for components needing event handlers, hooks, or browser APIs.
  • When fetching data, query databases directly in Server Components with async/await, use fetch() with caching options (revalidate, force-cache), and co-locate data fetching with the component that needs it.
  • When handling mutations, use Server Actions with "use server" directive and <form action={...}> for progressive enhancement, then call revalidatePath() or revalidateTag() after mutations.
  • When choosing rendering, default to ISR with revalidate for most pages, use generateStaticParams() for fully static pages, and dynamic = "force-dynamic" only when fresh data is required on every request.
  • When adding middleware, use middleware.ts at the project root for auth redirects, geolocation, and A/B testing with matcher config to scope it to specific routes.
  • When optimizing, use next/image for all images (WebP/AVIF, lazy loading), next/font for zero layout shift fonts, and generateMetadata() for dynamic SEO.

Examples

Example 1: Build a dashboard with Server Components

User request: "Create a Next.js dashboard with server-side data fetching and streaming"

Actions:

  1. Create dashboard layout with layout.tsx and parallel routes for widgets
  2. Fetch data directly in async Server Components with database queries
  3. Add loading.tsx for Suspense-based streaming of slow components
  4. Use revalidate for ISR to balance freshness and performance

Output: A fast dashboard that streams data progressively with zero client-side JavaScript for data fetching.

Example 2: Add authentication with Server Actions

User request: "Implement login/signup with Server Actions and middleware protection"

Actions:

  1. Create login form with <form action={loginAction}> using Server Actions
  2. Implement session management with encrypted cookies
  3. Add middleware to redirect unauthenticated users from /dashboard/*
  4. Use useOptimistic() for instant form feedback

Output: A progressively enhanced auth system with server-side validation and route protection.

Guidelines

  • Default to Server Components; add "use client" only for interactivity (event handlers, hooks, browser APIs).
  • Use Server Actions for mutations instead of API routes; they are simpler and support progressive enhancement.
  • Co-locate data fetching with components: fetch in the Server Component that needs the data, not in a parent.
  • Use loading.tsx at route boundaries for streaming; do not block the entire page on a slow query.
  • Use generateMetadata() for dynamic pages; static metadata export for fixed pages.
  • Set revalidate on fetch calls or at page level: ISR is almost always better than full SSR.
  • Use next/image for all images; the optimization is significant (WebP/AVIF, lazy loading, responsive).

Information

Version
1.0.0
Author
terminal-skills
Category
Development
License
Apache-2.0

Use Cases

>Add Authentication and Billing to a SaaS App
>Build a CMS-Powered Marketing Site
>Build a Data Dashboard with Next.js and TanStack
>Build a RAG-Powered Customer Support Bot
>Build an Interactive 3D Product Configurator
>Build a Multilingual SaaS with Transactional Emails
>Build a Real-Time Collaborative Whiteboard
>Build a Headless E-Commerce Store with Next.js
>Build Vector Search for an AI App
>Add Instant Search to Your App
>Add Product Analytics to a SaaS App
>Add SMS Verification and Transactional Notifications
>Build an Event-Driven Notification System
>Build a Real-Time Analytics Dashboard
>Build a Real-Time Analytics Dashboard with ClickHouse
>Build OAuth SSO Integration with Multiple Providers
>Build a Server-Sent Events Real-Time Dashboard
>Build a Drag-and-Drop Kanban Board
>Build a Background Job Monitoring Dashboard
>Build a White-Label SaaS Platform with Tenant Theming
>Implement End-to-End Encryption for User Data
>Ship an Offline-First Progressive Web App
>Build an AI-Powered Customer Onboarding Flow
>Build a Developer Portal with API Marketplace
>Build a Real-Time Collaborative Spreadsheet
>Build a Secure File Sharing Platform with Audit Trail
>Build a Headless CMS with Live Preview
>Build a Multi-Step Form Wizard with Validation
>Build AI Search Autocomplete with Embeddings
>Build Automated API Documentation from Code
>Build a Developer Portal with API Key Management
>Build GraphQL Subscriptions for a Live Dashboard
>Build an Internal Feature Request Voting System
>Build a Privacy Consent Management Platform
>Build a Container Orchestration Dashboard
>Build a Design System Component Library
>Build a Database Query Performance Analyzer
>Build a Real-Time Collaborative Whiteboard
>Build an A/B Testing Platform
>Build a Checkout Flow with Stripe
>Build a Changelog API with In-App Announcements
>Build a Drag-and-Drop Kanban Board
>Build an In-App Notification Center
>Build a Multi-Step Form Wizard
>Build a Rich Text Editor with Collaboration
>Build a Survey Builder with Analytics
>Build a User Onboarding Flow with Progress Tracking
>Build a Cookie Consent Manager
>Build an API Playground
>Build a Dark Mode Theme System
>Build a Monetized Niche Directory Website
>Build a Headless Shopify Storefront with Next.js
>Build a Niche Job Board SaaS
>Build a Linktree Alternative — Link-in-Bio with Analytics and Custom Domains
>Ship a Micro-SaaS in a Weekend
>Build a Multi-Tenant Admin Panel
>Build an Instant SaaS Demo Environment
>Build a Subscription Management Portal
>Build a Waitlist and Launch Page with Viral Referral
>Build a White-Label SaaS Platform
>Build a Self-Hosted Airtable Alternative