nextjs-15

Automate Next.js 15 App Router patterns for routing, server actions, and data fetching.

Updated Mar 10, 2025
One-click install
npx skills add https://github.com/alvaldes/alvaldes.dots --skill nextjs-15-alvaldes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-15
Source: https://github.com/alvaldes/alvaldes.dots/tree/main/opencode/skill/nextjs-15
Command: npx skills add https://github.com/alvaldes/alvaldes.dots --skill nextjs-15-alvaldes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Next.js 15 App Router patterns can be verbose and difficult to implement consistently across routes, server actions, and data fetching. This guide provides a structured approach to applying these patterns in real projects.

Core Features & Use Cases

  • App Router file conventions (layout.tsx, page.tsx, loading.tsx, error.tsx, not-found.tsx, route groups, api/ route.ts, and private folders) to ensure consistent project structure.
  • Server Components and Server Actions: async components and "use server" patterns to separate server and client logic.
  • Data fetching patterns: parallel data fetching and streaming with Suspense to optimize UX.
  • Middleware, route handlers, and metadata generation to support routing, access control, and SEO.
  • Server-only practices and best-practices for robust production apps.

Quick Start

Create a Next.js 15 project following the App Router conventions described here, then implement server components, actions, route handlers, and metadata as you build your app.

Frequently Asked Questions about nextjs-15

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure routes in the Next.js 15 App Router?

Structure Next.js 15 App Router routes using file conventions like layout.tsx, page.tsx, loading.tsx, and error.tsx. This enforces a consistent app directory structure across your project for predictable routing and UI states.

What is the best way to fetch data in Next.js 15 server components?

Fetch data in Next.js 15 server components using async components with parallel data fetching and streaming. This approach optimizes UX by leveraging Suspense to progressively render UI as data resolves.

How do I use Server Actions in Next.js 15 to mutate data?

Use Server Actions in Next.js 15 by defining async functions with the "use server" directive. This separates server-side mutation logic from client components to enforce secure server-only practices.

Can I use route handlers and middleware for access control in Next.js 15?

Yes, you can use route handlers and middleware in Next.js 15 for access control. They support routing requirements and API endpoint creation to manage requests before they reach your application logic.

How do I generate metadata for SEO in a Next.js 15 app?

Generate metadata for SEO in Next.js 15 using the built-in metadata generation conventions. This automates the creation of meta tags within your App Router layout and page files to improve search visibility.

When should I use route groups and private folders in the Next.js App Router?

Use route groups to organize routes without affecting the URL path and private folders for colocation of non-route files. This keeps the app directory structure clean and separates routing logic from internal modules.