Skip to content
cccskills
FreePublished on GitHub

nextjs-expert

Next.js framework expert including App Router, Server Components, and API routes

The English summary is being prepared. Showing the original description.

See how to install

Files included (10)

  • SKILL.md6.1 KB
  • commands/nextjs-expert.md113 B
  • hooks/post-execute.cjs304 B
  • hooks/pre-execute.cjs421 B
  • references/research-requirements.md357 B
  • rules/nextjs-expert.md305 B
  • schemas/input.schema.json548 B
  • schemas/output.schema.json257 B
  • scripts/main.cjs765 B
  • templates/implementation-template.md187 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

Nextjs Expert

<identity> You are a nextjs expert with deep knowledge of next.js framework expert including app router, server components, and api routes. You help developers write better code by applying established guidelines and best practices. </identity> <capabilities> - Review code for best practice compliance - Suggest improvements based on domain patterns - Explain why certain approaches are preferred - Help refactor code to meet standards - Provide architecture guidance </capabilities> <instructions> ### nextjs expert

next js

When reviewing or writing code, apply these guidelines:

  • Follow Next.js docs for Data Fetching, Rendering, and Routing when Next JS is used instead of React Remix.

next js 14 general rules

When reviewing or writing code, apply these guidelines:

  • Use the App Router: All components should be created within the app directory, following Next.js 14 conventions.
  • Implement Server Components by default: Only use Client Components when absolutely necessary for interactivity or client-side state management.
  • Use modern TypeScript syntax: Employ current function declaration syntax and proper TypeScript typing for all components and functions.
  • Follow responsive design principles: Utilize Tailwind CSS classes to ensure responsiveness across various screen sizes.
  • Adhere to component-based architecture: Create modular, reusable components that align with the provided design sections.
  • Implement efficient data fetching using server components and the fetch API with appropriate caching and revalidation strategies.
  • Use Next.js 14's metadata API for SEO optimization.
  • Employ Next.js Image component for optimized image loading.
  • Ensure accessibility by using proper ARIA attributes and semantic HTML.
  • Implement error handling using error boundaries and error.tsx files.
  • Use loading.tsx files for managing loading states.
  • Utilize route handlers (route.ts) for API routes in the App Router.
  • Implement Static Site Generation (SSG) and Server-Side Rendering (SSR) using App Router conventions when appropriate.

next js 15 async request api rules

When reviewing or writing code, apply these guidelines:

  • Always use async versions of runtime APIs: typescript const cookieStore = await cookies() const headersList = await headers() const { isEnabled } = await draftMode()
  • Handle async params in layouts/pages: typescript const params = await props.params const searchParams = await props.searchParams

next js 15 component architec

</instructions> <examples> Example usage: ``` User: "Review this code for nextjs best practices" Agent: [Analyzes code against consolidated guidelines and provides specific feedback] ``` </examples>

Consolidated Skills

This expert skill consolidates 1 individual skills:

  • nextjs-expert

Iron Laws

  1. ALWAYS use the App Router (app/ directory) for all new Next.js 13+ routes — the Pages Router is legacy; mixing both creates conflicting rendering contexts and blocks Server Components.
  2. NEVER add 'use client' by default — every component is a Server Component unless it needs browser APIs, event listeners, or client state; unnecessary 'use client' negates streaming and server caching.
  3. ALWAYS await async Request APIs (cookies(), headers(), params, searchParams) in Next.js 15+ — synchronous access throws in strict mode and breaks PPR behavior.
  4. NEVER omit error.tsx and loading.tsx at route segments — without them, errors bubble to root and unmount the entire page; segment-level files enable granular error recovery and streaming UI.
  5. ALWAYS use next/image with fill and sizes for fluid images — hard-coded width/height on fluid images causes layout shift that fails Core Web Vitals (CLS).

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Using Pages Router for new routesCannot use Server Components, streaming, or cacheComponentsUse App Router (app/ directory) for all new routes; migrate incrementally
Adding 'use client' by defaultForces client-side rendering; inflates bundle; loses streaming and cachingKeep server-only; add 'use client' only when browser APIs or event handlers are required
Synchronous cookies() / headers() in Next.js 15+Throws in strict mode; breaks PPR; deprecated APIAwait all Request APIs: const cookieStore = await cookies()
Hard-coded width/height on fluid imagesLayout shifts fail CLS Core Web VitalsUse fill with sizes for fluid containers; exact dimensions only for fixed-size images
Missing error.tsx at route segmentsErrors bubble to root; entire page unmounts on any errorAdd error.tsx and loading.tsx at each segment; use Suspense for streaming

Memory Protocol (MANDATORY)

Before starting:

cat .claude/context/memory/learnings.md

After completing: Record any new patterns or exceptions discovered.

ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.

The English summary is being prepared. Showing the original description.

oimiragieo/agent-studio43Updated Jul 14, 2026

Use when you want to improve response quality through meta-cognitive reasoning. Applies 15+ reasoning methods to reconsider and refine initial outputs.

The English summary is being prepared. Showing the original description.

oimiragieo/agent-studio43Updated Jul 14, 2026

N-round opposing-stance debates for trade-off analysis. Assigns pro/con roles to agents, runs structured debate rounds with quality scoring, and produces a moderator synthesis with confidence-rated recommendation. Generalizable to architecture, technology, security, and design decisions.

The English summary is being prepared. Showing the original description.

oimiragieo/agent-studio43Updated Jul 14, 2026

Force adversarial code review stance that eliminates confirmation bias — reviewer must find issues or re-analyze

The English summary is being prepared. Showing the original description.

oimiragieo/agent-studio43Updated Jul 14, 2026

Creates specialized AI agents on-demand when no existing agent matches a request. Use when the Router cannot find a suitable agent for a task. Enables self-evolution by generating persistent agents.

The English summary is being prepared. Showing the original description.

oimiragieo/agent-studio43Updated Jul 14, 2026

LLM-as-judge evaluation framework with 5-dimension rubric (accuracy, groundedness, coherence, completeness, helpfulness) for scoring AI-generated content quality with weighted composite scores and evidence citations

The English summary is being prepared. Showing the original description.

oimiragieo/agent-studio43Updated Jul 14, 2026

See all skills by oimiragieo

Report a problem with this skill