Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Next.js App Router Patterns and Code Review

    by Saizul Amin

    1

    This skill gives your agent a proven procedure plus scripts that check the facts, so you get the same correct answer every time, with exact fixes instead of vague advice.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Next.js App Router Patterns and Code Review

    Next.js App Router Patterns and Code Review

    Example session with this skill installed

    Run the Next.js App Router Patterns and Code Review skill on my project and give me a prioritised list of what to fix, with exact changes.

    • Read your context and instructions
    • Compiled the next js app

    Here is what the Next.js App Router Patterns and Code Review skill produced.

    Demo: real, unedited output of the skill's bundled script on a sample input from its test suite.

    Output

    rsc boundary check: 9 high, 2 medium, 1 low, 0 info
    HIGH   RSC008  app/blog/[slug]/page.tsx:5
           synchronous cookies() access (must be awaited since Next.js 15)
           fix: (await cookies()).get(...)
    HIGH   RSC008  app/blog/[slug]/page.tsx:6
           synchronous params access (params is a Promise since Next.js 15)
           fix: const { ... } = await params  (type it as Promise<...>)
    HIGH   RSC012  app/dashboard/@analytics
           parallel route slot without default.tsx (build fails in Next.js 16)
           fix: add default.tsx that returns null or calls notFound()
    HIGH   RSC002  app/error.tsx:1
           error.tsx must be a Client Component
           fix: add 'use client' as the first line
    HIGH   RSC001  app/page.tsx:4
           route file uses client-only feature 'useState(' without 'use client'
           fix: move the interactive part into a small 'use client' component and import it here
    HIGH   RSC005  components/Widget.tsx:2
           Client Component imports server-only module 'fs'
           fix: move this code to a Server Component, Server Action or route handler
    HIGH   RSC005  components/Widget.tsx:3
           Client Component imports 'revalidatePath' from next/cache (server-only API)
           fix: call it inside a Server Action ('use server') instead
    HIGH   RSC004  components/Widget.tsx:5
           metadata exports are ignored in Client Components
           fix: keep page/layout as a Server Component and move interactivity into a child
    HIGH   RSC006  components/Widget.tsx:7
           async Client Component (only Server Components can be async)
           fix: fetch on the server and pass data as props, or use use()/a data library in the client
    MEDIUM RSC011  app/actions.ts:5
           revalidateTag() with one argument is deprecated in Next.js 16
           fix: revalidateTag('posts', 'max') for stale-while-revalidate, or updateTag() in a Server Action for read-your-writes
    MEDIUM RSC003  app/layout.tsx:1
           'use client' on a layout makes every page below it client-rendered
           fix: keep the layout on the server; wrap only providers/interactive widgets in client files
    LOW    RSC013  middleware.ts
           middleware.ts is deprecated in Next.js 16
           fix: rename to proxy.ts and the exported function to proxy (npx @next/codemod@canary middleware-to-proxy .)
    

    What you do next

    1. Fix the highest-severity items first.
    2. Ask your agent to apply the fixes it suggests, then run the skill again to confirm.
    3. Keep the skill installed and re-run it whenever the project changes.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Design and review Next.js App Router code - layouts and route structure, Server vs Client Components and where to put the "use client" boundary, data fetching, caching and revalidation (Cache Components, "use cache", cacheLife, cacheTag, revalidateTag, updateTag, revalidatePath), streaming with Suspense and loading.tsx, parallel and intercepting routes, and Next.js 15/16 migration traps (async params, cookies(), headers(), proxy.ts, default.tsx). Includes a static checker for boundary mistakes.

    Who it's for

    Use when the user builds or refactors pages, layouts or components in app/, asks "should this be a server or client component", "how do I fetch/cache/revalidate this data", hits errors like "useState only works in Client Components", "params should be awaited", "Event handlers cannot be passed to Client Component props", or upgrades to Next.js 16.

    What's inside

    • Tested, offline Python script(s): rsc_boundary_check.py (deterministic results, standard library only unless noted)
    • Reference guides: patterns.md, decision-guide.md
    • Step-by-step agent instructions in SKILL.md covering: When to use; When not to use; Workflow; Rules of thumb

    Why it's worth it

    Generic prompts guess. This skill gives your agent a proven procedure plus scripts that check the facts, so you get the same correct answer every time, with exact fixes instead of vague advice. See the real demo below.

    Works with every major AI agent

    Built on the open SKILL.md standard: Claude Code, Codex CLI, Cursor, VS Code Copilot, Gemini CLI, Windsurf and 20+ other agents.

    Requirements

    • Python 3.8+ for the bundled scripts
    • No API keys, no account, runs locally

    Open source: saizul/nextjs-react-skills on GitHub (MIT licence, by Saizul Amin).

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Frequently Asked Questions

    Design and review Next.js App Router code - layouts and route structure, Server vs Client Components and where to put the "use client" boundary, data fetching, caching and revalidation (Cache Components, "use cache", cacheLife, cacheTag, revalidateTag, updateTag, revalidatePath), streaming with S...

    This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

    Connect your AI agent to Agensi through MCP, then ask it to use Next.js App Router Patterns and Code Review on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.