Back to Skills

app-router

verified

Next.js App Router - Server components, layouts, routing patterns

View on GitHub

Marketplace

pluginagentmarketplace-nextjs

pluginagentmarketplace/custom-plugin-nextjs

Plugin

custom-plugin-nextjs

Repository

pluginagentmarketplace/custom-plugin-nextjs
1stars

skills/app-router/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/pluginagentmarketplace/custom-plugin-nextjs/blob/main/skills/app-router/SKILL.md -a claude-code --skill app-router

Installation paths:

Claude
.claude/skills/app-router/
Powered by add-skill CLI

Instructions

# App Router Skill

## Overview

Master Next.js 14+ App Router with server components, layouts, and modern routing patterns.

## Capabilities

- **Layouts**: Root layout, nested layouts, templates
- **Server Components**: Default server rendering
- **Client Components**: Interactive with 'use client'
- **Route Groups**: (folder) for organization
- **Parallel Routes**: @slot for simultaneous rendering
- **Intercepting Routes**: (.) notation patterns

## Examples

```tsx
// app/layout.tsx
export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="en">
      <body>{children}</body>
    </html>
  )
}

// app/dashboard/page.tsx
export default async function DashboardPage() {
  const data = await fetchData() // Server-side
  return <Dashboard data={data} />
}
```

## Best Practices

- Use server components by default
- Add 'use client' only when needed
- Leverage layouts for shared UI
- Use loading.tsx for suspense

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
942 chars