rule-frontend-app-pages

Implement Next.js App Router pages with server components and generateMetadata.

1|1|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/btabaska/simpler-grants-documentation-automation --skill rule-frontend-app-pages
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rule-frontend-app-pages
Source: https://github.com/btabaska/simpler-grants-documentation-automation/tree/main/.claude/skills/rule-frontend-app-pages
Command: npx skills add https://github.com/btabaska/simpler-grants-documentation-automation --skill rule-frontend-app-pages

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Inconsistent implementation of Next.js App Router pages leads to fragmentation, higher maintenance cost, and missed opportunities for accessibility and internationalization. This rule codifies standard patterns for page and layout structure, routing conventions, and metadata usage to keep the frontend codebase cohesive.

Core Features & Use Cases

  • Server Components by default: pages and layouts use server components unless client interactivity is required.
  • Metadata generation and i18n: generateMetadata() should integrate with translations and avoid hard-coded strings, ensuring locale-aware titles and descriptions.
  • App Router patterns: enforce async params typing, locale routing structure, ISR/dynamic behavior, and proper error and loading boundaries.
  • Contextual governance: aligns with existing architecture rules and supports specialist validation for complex changes.

Quick Start

Follow these guidelines when creating or updating Next.js App Router pages to ensure a consistent architecture across the frontend codebase.

Frequently Asked Questions about rule-frontend-app-pages

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

FAQPage Schema
How do I structure Next.js App Router pages with server components by default?

Next.js App Router pages should use server components by default unless client interactivity is required. This rule enforces standard patterns for page and layout structure, async params typing, and proper error boundaries to maintain a cohesive frontend codebase.

What is the best way to generate locale-aware metadata in Next.js App Router?

Locale-aware metadata in Next.js App Router is best generated using the generateMetadata() function integrated with translations. This approach avoids hard-coded strings and ensures locale-aware titles and descriptions across your application.

How do I configure ISR and dynamic behavior for Next.js App Router pages?

Configuring ISR and dynamic behavior for Next.js App Router pages requires specifying export const revalidate and export const dynamic values. This rule guides developers in properly classifying routes for incremental static regeneration and dynamic rendering.

Does this Next.js App Router rule apply to dynamic routes and locale routing?

Yes, this Next.js App Router rule applies to page routes under frontend/src/app including layout/page.tsx, dynamic routes, and locale routing. It covers async params typing, locale routing structure, and proper error and loading boundaries.

Why do I need error and loading boundaries in Next.js App Router pages?

Error and loading boundaries in Next.js App Router pages are needed to handle runtime errors and streaming states gracefully. This rule codifies standard patterns for these boundaries to reduce fragmentation and lower maintenance cost.