skills/comprehensive-nextjs-expert/SKILL.md
A comprehensive master skill for modern Next.js development using the App Router, React, TypeScript, and Tailwind CSS. Make sure to use this skill whenever the user asks to build, refactor, or debug Next.js applications, server components, or mentions React, RSC, SSR, SSG, or Tailwind CSS within a Next.js context.
npx skillsauth add hrdtbs/agent-skills comprehensive-nextjs-expertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides comprehensive guidelines and best practices for developing high-quality, modern applications using Next.js (App Router), React, TypeScript, and Tailwind CSS. It is designed to enforce consistency, performance, and maintainability across all Next.js projects.
"use client") only when interactivity or browser APIs are strictly required.layout.tsx, page.tsx, loading.tsx, error.tsx, and route.ts appropriately.components/auth-wizard, app/dashboard).page.tsx and layout.tsx which require default exports).types directory for shared types.fetch or direct database calls (e.g., via Drizzle or Prisma).useEffect or useState for data fetching.try/catch block for expected control flow.nuqs for URL search parameter state management rather than complex React state for URL-driven state.clsx and tailwind-merge for dynamic class construction.next/image component for all images to ensure WebP formatting, lazy loading, and correct sizing.error.tsx and global-error.tsx to catch unexpected errors gracefully and provide a fallback UI."use client" globally or at the top level without a specific reason.
Why: It defeats the purpose of React Server Components, unnecessarily increasing the JavaScript bundle size shipped to the client and degrading performance.useEffect on the client if it can be fetched on the server.
Why: Client-side fetching introduces waterfalls and worsens the First Contentful Paint (FCP) and overall user experience.if (condition) return;).index.tsx inside the app directory).
Why: The App Router relies strictly on file names like page.tsx or layout.tsx to function. Deviating from this breaks routing.testing
Evaluate Agent Skill design quality against official specifications and best practices. Use when reviewing, auditing, or improving SKILL.md files and skill packages. Provides multi-dimensional scoring and actionable improvement suggestions.
testing
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
development
Evaluate and score user-written LLM prompts on a 100-point scale across 5 axes (Clarity, Structure, Information Content, Specificity, Context), providing specific improvement suggestions and a revised prompt. Make sure to use this skill whenever the user asks to evaluate, review, score, or improve a prompt, or when they say things like 'このプロンプトどう?', 'プロンプトを評価して', 'rate my prompt', 'review this prompt', or 'is this prompt good enough?'. This skill focuses on scoring existing prompts, not writing new ones from scratch.
testing
Apply prompt engineering best practices to write, refine, and optimize system prompts, user prompts, and agent instructions. Use this skill whenever the user wants to write a prompt, optimize an existing prompt for better results, fix a prompt that is hallucinating or underperforming, or structure prompts for Large Language Models (LLMs). Even if the user just says "help me write instructions for my agent", trigger this skill.