next-patterns

Apply Next.js 16 App Router best practices and caching strategies to frontend code.

Updated Dec 14, 2025
One-click install
npx skills add https://github.com/toobutta/maptelli --skill next-patterns-toobutta
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-patterns
Source: https://github.com/toobutta/maptelli/tree/main/.claude/skills/next-patterns
Command: npx skills add https://github.com/toobutta/maptelli --skill next-patterns-toobutta

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps frontend teams implement Next.js 16 App Router best practices and caching patterns to prevent data and performance issues during development and production.

Core Features & Use Cases

  • App Router best practices coverage across project structure, route segments, and middleware conventions.
  • RSC boundaries, async patterns, and runtime selection guidance for server and edge environments.
  • Caching strategies including Cache Components, use cache directive, cache tagging, and revalidation workflows.
  • Maptelli-specific guidance on server/client component boundaries and data-fetching strategies.
  • Migration guidance from older Next.js patterns to the new App Router approach.

Quick Start

Review the App Router patterns in this Skill and apply the recommended practices to your Next.js frontend pages.

Frequently Asked Questions about next-patterns

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

FAQPage Schema
How do I configure per-route caching in Next.js 16 App Router?

To configure per-route caching in Next.js 16 App Router, use cache APIs like cacheLife and cacheTag within your route segments. This Skill guides applying these directives and per-route caching configurations to optimize data fetching and revalidation workflows.

How does the 'use cache' directive work with React Server Components in Next.js?

The 'use cache' directive works with React Server Components by defining caching boundaries at the component level. It integrates with cache tagging and revalidation workflows to manage how fetched data is stored and refreshed across server and edge runtimes.

What is the best way to structure RSC boundaries and 'use client' directives in Next.js App Router?

The best way to structure RSC boundaries is by strictly enforcing 'use client' and 'use server' directives. This Skill guides defining scope across app routes and establishing correct server/client component boundaries for optimal data-fetching strategies.

When should I use the edge runtime versus the Node runtime in Next.js App Router?

You should choose between edge and Node runtimes based on your data fetching and caching needs. This Skill provides runtime selection guidance for server and edge environments to ensure correct route handler execution and web performance optimization.

How do I migrate older Next.js data fetching patterns to the new App Router approach?

Migrating to the Next.js App Router involves adopting async patterns and new cache APIs like cacheLife. This Skill provides migration guidance from older Next.js patterns to the new App Router approach, covering route handlers and generateMetadata implementation.

Does Next.js App Router support generateMetadata for dynamic route segments?

Yes, Next.js App Router supports generateMetadata for dynamic route segments. This Skill enforces correct usage of generateMetadata alongside route handlers and caching configurations to ensure proper metadata generation across your app routes.