home / skills / ehtbanton / claudeskillsrepo / nextjs-page-generator
This skill generates complete Next.js 14 App Router page components with server and client patterns, data fetching, and layout files.
npx playbooks add skill ehtbanton/claudeskillsrepo --skill nextjs-page-generatorReview the files below or copy the command above to add this skill to your agents.
---
name: nextjs-page-generator
description: Generate Next.js page components with App Router, Server Components, and data fetching. Triggers on "create nextjs page", "generate next.js route", "nextjs app router page", "next page component".
---
# Next.js Page Generator
Generate Next.js page components using App Router with Server/Client Components and data fetching.
## Output Requirements
**File Output:** `page.tsx`, `layout.tsx`, `loading.tsx`, `error.tsx`
**Format:** Valid Next.js 14 TypeScript
**Standards:** Next.js App Router conventions
## When Invoked
Immediately generate complete Next.js page files with appropriate patterns for the use case.
## Example Invocations
**Prompt:** "Create Next.js page for product listing"
**Output:** Complete `app/products/page.tsx` with Server Component data fetching.
This skill generates complete Next.js App Router page components in TypeScript, including page.tsx, layout.tsx, loading.tsx, and error.tsx. It supports Server Components, Client Components, and common data fetching patterns targeted to Next.js 14 conventions. Use it to scaffold fully working route folders that follow App Router best practices.
On trigger, the skill produces a folder-level set of files (page.tsx, layout.tsx, loading.tsx, error.tsx) with valid TypeScript and Next.js conventions. It chooses Server Components by default, inserts data fetching logic (fetch, getServerSideProps-like patterns adapted for App Router), and marks client components with 'use client' when necessary. The output is ready to drop into an app/ route and integrates typical error and loading UI patterns.
Does the skill produce TypeScript only?
Yes. Output files are valid TypeScript tailored for Next.js App Router and modern typing patterns.
Will it create client-side interactivity?
Interactive parts are generated as separate Client Components with 'use client', while data fetching and rendering default to Server Components.