.agents/skills/nextjs-app-router/SKILL.md
# Next.js App Router — Skill **Name:** `nextjs-app-router` **Purpose:** Ensure correct App Router architecture, rendering strategy, and data fetching in Next.js. Use this skill whenever working under `/app`. **Applies when:** Routing, layouts, server/client boundaries, data fetching, Suspense, Server Actions. **Do not use when:** Working in the Pages Router (`/pages`) or non-Next.js projects. ## Rules - **Server-first:** Default to Server Components; add `'use client'` only for interactivity
npx skillsauth add asymmetric-al/core .agents/skills/nextjs-app-routerInstall 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.
Name: nextjs-app-router
Purpose: Ensure correct App Router architecture, rendering strategy, and data fetching in Next.js.
Use this skill whenever working under /app.
Applies when: Routing, layouts, server/client boundaries, data fetching, Suspense, Server Actions.
Do not use when: Working in the Pages Router (/pages) or non-Next.js projects.
'use client' only for interactivity or browser APIs.layout.tsx for shared UI; keep layouts stable; use route groups (group) for organization.<Suspense> for slow or user-specific UI.error.tsx and not-found.tsx for route-level handling.'use client' on large treeserror.tsx / not-found.tsxexport default async function Page() {
const data = await getData();
return <View data={data} />;
}
"use client";
export function Button({ onClick }: { onClick: () => void }) {
return <button onClick={onClick}>Click</button>;
}
export default function Layout({ children }: { children: React.ReactNode }) {
return (
<>
<Header />
{children}
</>
);
}
'use client'development
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.
testing
Use when CI tests fail on main branch after PR merge, or when investigating flaky test failures in CI environments
tools
Use when new translation keys are added to packages to generate new translations strings
data-ai
Pointer to the canonical agent instruction and skill system for this monorepo