nextjs

Guide Next.js App Router architecture, Server Components, and data fetching patterns.

Updated Feb 5, 2026
One-click install
npx skills add https://github.com/Objective-Arts/lens --skill nextjs-objective-arts
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: nextjs
Source: https://github.com/Objective-Arts/lens/tree/main/canon/javascript/nextjs
Command: npx skills add https://github.com/Objective-Arts/lens --skill nextjs-objective-arts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to building modern web applications with Next.js, focusing on the App Router's architecture, Server Components, and best practices.

Core Features & Use Cases

  • Server-First Architecture: Understand and implement the default-to-server paradigm.
  • Client Boundary Management: Learn when and how to use 'use client' effectively.
  • Data Fetching Strategies: Master fetching data in Server Components and using Server Actions.
  • File Conventions: Navigate the App Router's file-based routing and special files.
  • Use Case: Refactor an existing Next.js application to leverage Server Components for improved performance and reduced client-side JavaScript.

Quick Start

Review the core principles of Server Components by default.

Frequently Asked Questions about nextjs

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

FAQPage Schema
How do I use Server Components in Next.js App Router?▼

Server Components in the Next.js App Router are the default for rendering, allowing you to fetch data directly on the server to reduce client-side JavaScript and improve performance.

When should I use 'use client' for client boundaries in Next.js?▼

Use 'use client' to establish client boundaries only when you need interactivity, state, or browser APIs, keeping the server-first architecture intact to minimize client-side JavaScript.

What is the best way to fetch data with Server Actions in Next.js?▼

The best way to fetch data is directly inside Server Components or via Server Actions, leveraging the server-first architecture to securely access databases without creating separate API endpoints.

How do I refactor an existing Next.js application to use App Router file conventions?▼

Refactoring to the App Router involves migrating to its file-based routing conventions and special files, adopting a server-first architecture, and replacing pages API logic with Server Actions.

What are common anti-patterns when rendering Server Components in Next.js?▼

Common Server Components anti-patterns include unnecessarily adding 'use client' directives or fetching data in client components, which breaks the server-first architecture and increases client bundle sizes.