nextjs

Guide Next.js App Router development with component and data fetching strategies.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/0r0loo/my-claude-code-toolkit --skill nextjs-0r0loo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs
Source: https://github.com/0r0loo/my-claude-code-toolkit/tree/main/.claude/skills/NextJS
Command: npx skills add https://github.com/0r0loo/my-claude-code-toolkit --skill nextjs-0r0loo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide and best practices for developing with Next.js using the App Router, ensuring efficient and maintainable application development.

Core Features & Use Cases

  • App Router Structure: Understand reserved filenames and directory conventions.
  • Server vs. Client Components: Learn when and how to differentiate between Server and Client Components.
  • Data Fetching & Route Handlers: Implement efficient data fetching strategies and build API routes.
  • Middleware & Server Actions: Secure your application and handle form submissions effectively.
  • Optimization: Optimize metadata, directory structure, images, and fonts.
  • Use Case: When building a new Next.js application, use this Skill to ensure all components are correctly implemented as Server or Client Components, and that data fetching is optimized for performance.

Quick Start

Refer to the Next.js Skill to implement a new page with dynamic metadata and server-side data fetching.

Frequently Asked Questions about nextjs

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

FAQPage Schema
How do I differentiate Server and Client Components in Next.js App Router?

Next.js App Router differentiates Server and Client Components by convention, using specific directives to designate Client Components while defaulting to Server Components. This distinction optimizes data fetching and rendering strategies for maintainable application development.

What is the best way to fetch data in Next.js App Router?

The best way to fetch data in Next.js App Router involves leveraging Server Components for direct data retrieval, minimizing client-side JavaScript. This approach ensures optimized performance and efficient data handling without manual API orchestration.

How do I create API endpoints using Next.js Route Handlers?

Next.js Route Handlers create API endpoints by defining functions within specific directory conventions under the App Router. This mechanism facilitates building backend API routes that securely process requests and return responses.

Can I use Server Actions for form submissions in Next.js?

Yes, you can use Server Actions in Next.js to handle form submissions effectively without creating separate API endpoints. This technique processes mutations directly on the server, streamlining data updates and form handling.

How do I optimize images and fonts in a Next.js application?

Optimize images and fonts in a Next.js application by utilizing the framework's built-in optimization features. This process automatically serves appropriately sized assets and manages font loading to enhance overall performance and metadata.