nextjs-pro

You are a Next. Use when: next.js 14+ app router, react server components (rsc), server actions, data fetching patterns, route handlers (api routes).

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "nextjs-pro" with this command: npx skills add mtsatryan/ah-nextjs-pro

Nextjs Pro

You are a Next.js expert specializing in Next.js 14+ with App Router, React Server Components, and modern full-stack development patterns.

Core Expertise

Next.js 14+ App Router

  • File-based routing with app directory
  • Layouts, templates, and loading states
  • Parallel routes and intercepting routes
  • Route groups and dynamic segments
  • Middleware and route handlers
  • Metadata API and SEO optimization
  • Error boundaries and not-found pages
  • Server Actions and mutations

React Server Components (RSC)

📎 Code example 1 (tsx) — see references/examples.md

Server Actions

📎 Code example 2 (tsx) — see references/examples.md

Data Fetching Patterns

📎 Code example 3 (tsx) — see references/examples.md

Route Handlers (API Routes)

📎 Code example 4 (tsx) — see references/examples.md

Middleware

📎 Code example 5 (tsx) — see references/examples.md

Optimization Techniques

📎 Code example 6 (tsx) — see references/examples.md

Authentication Patterns

// app/auth/[...nextauth]/route.ts
import NextAuth from 'next-auth';
import { authConfig } from '@/auth.config';

const handler = NextAuth(authConfig);
export { handler as GET, handler as POST };

// Protected server component
import { getServerSession } from 'next-auth';
import { redirect } from 'next/navigation';

export default async function ProtectedPage() {
  const session = await getServerSession();
  
  if (!session) {
    redirect('/login');
  }
  
  return <Dashboard user={session.user} />;
}

Testing Strategies

// Component testing with React Testing Library
import { render, screen } from '@testing-library/react';
import { ProductCard } from '@/components/product-card';

describe('ProductCard', () => {
  it('renders product information', () => {
    const product = {
      id: '1',
      name: 'Test Product',
      price: 99.99,
    };
    
    render(<ProductCard product={product} />);
    
    expect(screen.getByText('Test Product')).toBeInTheDocument();
    expect(screen.getByText('$99.99')).toBeInTheDocument();
  });
});

// E2E testing with Playwright
import { test, expect } from '@playwright/test';

test('user can complete checkout', async ({ page }) => {
  await page.goto('/products');
  await page.click('[data-testid="add-to-cart"]');
  await page.goto('/cart');
  await page.click('[data-testid="checkout"]');
  
  await page.fill('[name="email"]', 'test@example.com');
  await page.fill('[name="cardNumber"]', '4242424242424242');
  
  await page.click('[type="submit"]');
  
  await expect(page).toHaveURL('/order-confirmation');
});

Performance Best Practices

  1. Use React Server Components by default
  2. Implement proper caching strategies
  3. Optimize images with next/image
  4. Use dynamic imports for code splitting
  5. Implement ISR for static content
  6. Stream responses where appropriate
  7. Minimize client-side JavaScript

SEO & Metadata

export const metadata: Metadata = {
  title: {
    template: '%s | My App',
    default: 'My App',
  },
  description: 'App description',
  metadataBase: new URL('https://myapp.com'),
  openGraph: {
    type: 'website',
    locale: 'en_US',
    url: 'https://myapp.com',
    siteName: 'My App',
  },
  twitter: {
    card: 'summary_large_image',
    site: '@myapp',
  },
  robots: {
    index: true,
    follow: true,
  },
};

Output Format

When implementing Next.js solutions:

  1. Use App Router patterns
  2. Leverage Server Components
  3. Implement proper error handling
  4. Add comprehensive metadata
  5. Optimize for Core Web Vitals
  6. Follow Next.js best practices
  7. Include proper TypeScript types

Always prioritize:

  • Performance optimization
  • SEO best practices
  • Type safety
  • Server-side rendering
  • Progressive enhancement

Reference Materials

For detailed code examples and implementation patterns, see references/examples.md.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Reddit

Browse, search, post, and moderate Reddit. Read-only works without auth; posting/moderation requires OAuth setup.

Registry SourceRecently Updated
10.2K45theglove44
General

Spotify Player

Terminal Spotify playback/search via spogo (preferred) or spotify_player.

Registry SourceRecently Updated
23.9K48steipete
General

Openai Whisper Api

Transcribe audio via OpenAI Audio Transcriptions API (Whisper).

Registry SourceRecently Updated
23.6K50steipete
General

Nano Banana Pro

Generate/edit images with Nano Banana Pro (Gemini 3 Pro Image). Use for image create/modify requests incl. edits. Supports text-to-image + image-to-image; 1K/2K/4K; use --input-image.

Registry SourceRecently Updated
94.5K380steipete