nextjs-page-generator

Generate Next.js 13+ App Router pages with Server/Client components and API routes.

7|2|Updated Nov 9, 2025
One-click install
npx skills add https://github.com/Prompt-or-Die-Labs/hyper-forge --skill nextjs-page-generator-prompt-or-die-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-page-generator
Source: https://github.com/Prompt-or-Die-Labs/hyper-forge/tree/main/.claude/skills/nextjs-page-generator
Command: npx skills add https://github.com/Prompt-or-Die-Labs/hyper-forge --skill nextjs-page-generator-prompt-or-die-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It removes the friction of setting up consistent, modern Next.js 13+ App Router pages by generating correct Server/Client component structure, routing patterns, and common UI states.

Core Features & Use Cases

  • App Router Page Composition: Produces Server Components by default, adding Client Components only where interactivity is needed, with proper loading/error/not-found handling.
  • SEO and Caching Patterns: Generates page metadata and ISR-friendly revalidate/next fetch configuration for predictable performance.
  • Full-Stack Scaffolding: Creates dynamic routes ([id]), optional generateStaticParams, and API routes with input validation (e.g., Zod), including status codes and pagination-ready request shapes.
  • Use Case: When you need a Users feature, it can generate app/users/page.tsx, loading.tsx, error.tsx, not-found.tsx, a client-side search UI, the dynamic /users/[id] page, and /api/users endpoints.

Quick Start

Ask for: "Generate Next.js 13+ App Router pages and API route for a Users feature with search, pagination, dynamic user profiles, loading/error states, metadata, and Zod-validated POST handling."

Frequently Asked Questions about nextjs-page-generator

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

FAQPage Schema
How do I generate Next.js 13 App Router pages with correct Server and Client component boundaries?

To generate Next.js 13 App Router pages with correct boundaries, use a scaffolding tool that defaults to Server Components and adds Client Components only for interactive UI elements like search inputs. This approach ensures proper component separation while handling loading, error, and not-found states automatically.

What's the best way to structure dynamic routes and API endpoints in a Next.js App Router project?

The best way to structure dynamic routes and API endpoints in a Next.js App Router project is to scaffold feature directories containing dynamic [id] routes and API routes together. This includes generating static params and Zod-validated POST handlers to ensure type-safe data fetching and input validation across the feature.

How do I add loading, error, and not-found states to Next.js App Router feature pages?

To add loading, error, and not-found states to Next.js App Router feature pages, generate dedicated loading.tsx, error.tsx, and not-found.tsx files alongside your page.tsx. This pattern provides predictable UI states during data fetching, runtime errors, and missing resource scenarios within your application's routing structure.

Does Next.js 13 App Router support ISR-friendly data fetching and metadata generation for feature pages?

Next.js 13 App Router supports ISR-friendly data fetching and metadata generation by applying revalidate configurations to fetch requests and exporting metadata objects from page files. This combination enables incremental static regeneration while delivering SEO-friendly metadata for lists, pagination, and entity profiles.

Can I use Zod validation for API route input handling in a Next.js TypeScript application?

You can use Zod validation for API route input handling in a Next.js TypeScript application by validating request bodies against defined schemas before processing. This ensures type-safe POST handling, returning appropriate status codes for invalid inputs while maintaining consistent API request shapes across endpoints.

Why do I need separate Client Components for search and pagination in Next.js Server Components?

You need separate Client Components for search and pagination in Next.js Server Components because interactive UI elements require client-side state management. Keeping the parent page as a Server Component while isolating interactivity ensures optimal rendering performance and maintains correct App Router component boundaries.