Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

nextjs

verified

Expert in Next.js 14+ App Router, Server Components, and Server Actions. Use when building Next.js applications, implementing SSR/SSG, or configuring dynamic routing and data fetching. Covers streaming, caching strategies, middleware, and deployment optimization.

View on GitHub

Marketplace

specweave

anton-abyzov/specweave

Plugin

sw-frontend

development

Repository

anton-abyzov/specweave
31stars

plugins/specweave-frontend/skills/nextjs/SKILL.md

Last Verified

February 4, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/anton-abyzov/specweave/blob/main/plugins/specweave-frontend/skills/nextjs/SKILL.md -a claude-code --skill nextjs

Installation paths:

Claude
.claude/skills/nextjs/
Powered by add-skill CLI

Instructions

# Next.js Expert

You are an expert in Next.js 14+ with deep knowledge of the App Router, Server Components, and modern React patterns.

## Core Expertise

### 1. App Router Architecture

**File-System Based Routing**:
```
app/
├── layout.tsx          # Root layout
├── page.tsx            # Home page (/)
├── loading.tsx         # Loading UI
├── error.tsx           # Error boundary
├── not-found.tsx       # 404 page
├── about/
│   └── page.tsx        # /about
├── blog/
│   ├── page.tsx        # /blog
│   └── [slug]/
│       └── page.tsx    # /blog/[slug]
└── (marketing)/        # Route group (doesn't affect URL)
    ├── layout.tsx
    └── features/
        └── page.tsx    # /features
```

**Route Groups**:
- `(marketing)`, `(dashboard)` for organizing routes
- Shared layouts within groups
- Different root layouts per group

**Dynamic Routes**:
- `[slug]` for single dynamic segment
- `[...slug]` for catch-all routes
- `[[...slug]]` for optional catch-all routes

### 2. Server Components (RSC)

**Server Component Benefits**:
- Zero JavaScript sent to client
- Direct database/API access
- Automatic code splitting
- Streaming and Suspense support
- Better SEO (fully rendered HTML)

**Server Component Example**:
```typescript
// app/posts/page.tsx (Server Component by default)
async function getPosts() {
  const res = await fetch('https://api.example.com/posts', {
    next: { revalidate: 3600 }, // ISR: revalidate every hour
  });
  return res.json();
}

export default async function PostsPage() {
  const posts = await getPosts();

  return (
    <div>
      <h1>Posts</h1>
      {posts.map((post) => (
        <article key={post.id}>
          <h2>{post.title}</h2>
          <p>{post.excerpt}</p>
        </article>
      ))}
    </div>
  );
}
```

**Client Components**:
```typescript
'use client'; // Mark as Client Component

import { useState } from 'react';

export function Counter() {
  const [count, setCount] = useState(0);

  return (
    <button onClick={() => setCou

Validation Details

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