nxt-page

nxt-page is a command for Claude Code from mertjane/awesome-claude-commands. It costs 40 tokens per session (1,053 once invoked), scanned A, original, MIT.

A command that creates the files for a page in a Next.js App Router project, including the page, loading, and error states. It examines existing pages and the route path to follow the project's conventions.

In plain words
What is it for?
Creating pages for routes such as `dashboard/settings`, `blog/[slug]`, or nested dynamic routes. It helps set up route folders, URL parameters, layouts, imports, and page metadata.
Why use it?
It removes the repetitive setup work and helps new pages match the structure and style already used in the project. It also stops when the project uses Next.js's older Pages Router, which it does not support.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Creating pages for routes such as dashboard/settings, blog/[slug], or nested dynamic routes. It helps set up route folders, URL parameters, layouts, imports, and page metadata.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/mertjane/awesome-claude-commands/nxt-page
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.

Clone the repo
git clone --depth 1 https://github.com/mertjane/awesome-claude-commands

Made for: Claude Code.

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 nxt-page

README.md
[![agentmods](https://agentmods.dev/badge/commands/mertjane/awesome-claude-commands/nxt-page/github.svg)](https://agentmods.dev/commands/mertjane/awesome-claude-commands/nxt-page)
Your own site
<a href="https://agentmods.dev/commands/mertjane/awesome-claude-commands/nxt-page"><img src="https://agentmods.dev/badge/commands/mertjane/awesome-claude-commands/nxt-page/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nxt-page

Your own site · 80×15
<a href="https://agentmods.dev/commands/mertjane/awesome-claude-commands/nxt-page"><img src="https://agentmods.dev/badge/commands/mertjane/awesome-claude-commands/nxt-page.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,053 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00040 $0.01053
Opus 5 $0.00020 $0.00526
Sonnet 5 $0.00008 $0.00211
Haiku 4.5 $0.00004 $0.00105

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

Security

Grade A, and why

nxt-page 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 12d 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.

commands/nxt-page.md · 152 lines

How it starts

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

Generate Next.js Page

Create a complete Next.js App Router page set for the route provided in $ARGUMENTS.

Parse $ARGUMENTS as the route path (e.g. dashboard/settings, blog/[slug], shop/[category]/[id]).

Step 1 — Detect Project Structure

Check whether the project uses App Router or Pages Router:

  • If app/ directory exists → App Router
  • If pages/ directory exists → Pages Router
  • If both exist → prefer App Router

If Pages Router is detected, stop and inform the user that this command supports App Router only.

Find the app directory root:

  • app/, src/app/

Step 2 — Analyze Existing Pages

Read 2–3 existing page.tsx files from the project:

Glob: {app,src/app}/**/page.tsx

Detect:

  • Import patterns (aliased imports with @/ vs relative)
  • Whether pages use async server components
  • Whether pages pass params and searchParams props
  • Metadata pattern (export const metadata vs generateMetadata)
  • Layout usage patterns

Step 3 — Parse Route Segments

Analyze the route path from $ARGUMENTS:

  • Static segment: dashboard → folder dashboard/
  • Dynamic segment: [slug] → folder [slug]/ with params.slug
  • Catch-all: [...slug]params.slug is string[]
  • Optional catch-all: [[...slug]]params.slug is string[] | undefined
  • Route groups: (group)/route → folder (group)/route/

Build the full output path: {app_root}/{route_path}/

Step 4 — Generate page.tsx

Generate an async Server Component:

import type { Metadata } from "next"

// Only include if dynamic params exist:
interface PageProps {
  params: Promise<{ {param}: string }>
  searchParams?: Promise<{ [key: string]: string | string[] | undefined }>
}

export const metadata: Metadata = {
  title: "{Page Title}",
}

// With dynamic params:
export default async function {SegmentName}Page({ params }: PageProps) {
  const { {param} } = await params

  return (
    <main className="container mx-auto px-4 py-8">
      <h1 className="text-2xl font-bold">{Page Title}</h1>
    </main>
  )
}

// Without dynamic params:
export default async function {SegmentName}Page() {
  return (
    <main className="container mx-auto px-4 py-8">
      <h1 className="text-2xl font-bold">{Page Title}</h1>
    </main>
  )
}

Read the full file on GitHub · 152 lines

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. 12d ago First seen · 152 lines · 40 tokens per session scan A fa7ab7577284

Subscribe to this mod's changes

nxt-page is a command published in the GitHub repository mertjane/awesome-claude-commands (2 stars, last pushed 6mo ago), licensed MIT. It adds 40 tokens to every session and 1,053 once invoked, about $0.0002 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-08-31.

Related

Other commands, from other repositories

react-patterns

Review React code for performance and composition patterns — 50+ rules ranked by impact.

jezweb/claude-skills · 16 tokens

form-builder

Build accessible, validated forms with React Hook Form + Zod + shadcn Form, wired to a Next.js server action. Use when adding any form (contact, signup, chec...

m-binimran/dev-pack · 39 tokens

review-component

Review a specific React component file using code-review-agent and frontend-development-agent. Analyze component architecture, proper Server vs Client component usage, prop types, hooks patterns (useState, useEffect, useCallback, useMemo), accessibility attributes (ARIA labels, semantic HTML, keyboard navigation)…

LarouexNonprofitConsulting/larouex-fullstack-plugin · 0 tokens

review-performance

Analyze application performance using code-review-agent and monitoring-observability-agent. Check Core Web Vitals (LCP < 2.5s, FID < 100ms, CLS < 0.1), bundle size analysis, image optimization (next/image, WebP format), font optimization (next/font), code splitting and lazy loading, caching strategies…

LarouexNonprofitConsulting/larouex-fullstack-plugin · 0 tokens

add-error-boundary

Implement React error boundaries throughout the application. Create error boundary component with componentDidCatch lifecycle. Add fallback UI with friendly error message and retry button. Log errors to monitoring service (Sentry, Azure Monitor) with stack traces. Implement granular boundaries for different sections…

LarouexNonprofitConsulting/larouex-fullstack-plugin · 0 tokens

migrate-to-nextjs15

Upgrade this Next.js project to version 15. Update package.json dependencies to Next.js 15 and React 19. Migrate App Router patterns and update metadata API usage following latest conventions. Fix breaking changes in configuration, middleware, and API routes. Update next.config.ts with new configuration options. Test…

LarouexNonprofitConsulting/larouex-fullstack-plugin · 0 tokens