nextjs-anti-patterns

Detect and correct Next.js App Router anti-patterns in code.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/VoldemortGin/claude-skills --skill nextjs-anti-patterns-voldemortgin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-anti-patterns
Source: https://github.com/VoldemortGin/claude-skills/tree/main/skills/nextjs-anti-patterns
Command: npx skills add https://github.com/VoldemortGin/claude-skills --skill nextjs-anti-patterns-voldemortgin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers identify and correct common anti-patterns in Next.js App Router applications, preventing performance issues and ensuring best practices are followed.

Core Features & Use Cases

  • Identify Anti-Patterns: Detects incorrect useEffect and useState usage, inappropriate Server/Client component boundaries, and legacy Pages Router patterns.
  • Performance Optimization: Guides users on avoiding waterfalls, over-using client components, and inefficient data fetching.
  • Use Case: When reviewing a Next.js project, use this Skill to ensure that data fetching is done server-side and that client-side interactivity is minimized to only where it's strictly needed.

Quick Start

Review the current Next.js code for common anti-patterns and suggest corrections.

Frequently Asked Questions about nextjs-anti-patterns

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

FAQPage Schema
How do I fix incorrect useEffect and useState usage in Next.js App Router?

Fix incorrect useEffect and useState usage in Next.js App Router by moving data fetching server-side and minimizing client-side state. This prevents performance bottlenecks and ensures proper Server and Client component boundaries.

What are common Next.js App Router anti-patterns when migrating from the Pages Router?

Common Next.js App Router anti-patterns when migrating from the Pages Router include retaining legacy data fetching patterns and over-using client components. Correct them by shifting data fetching to the server and restricting client interactivity to where it is strictly needed.

How do I avoid data fetching waterfalls in Next.js App Router?

Avoid data fetching waterfalls in Next.js App Router by performing data fetching on the server side. This eliminates sequential client-side requests and ensures adherence to Next.js best practices for server components.

When should I use Client components instead of Server components in Next.js?

Use Client components in Next.js only when client-side interactivity is strictly needed, such as for browser detection. Keep all other components on the server to prevent performance bottlenecks and inappropriate rendering.

What is the best way to review Next.js code for performance bottlenecks?

The best way to review Next.js code for performance bottlenecks is to check for inappropriate Server and Client component boundaries, over-used client components, and inefficient server-side data fetching to ensure best practices are followed.