/harness-claude:next-app-routerfrom harness-claude
Guides structuring Next.js 13+ apps with App Router conventions: layouts, nested routes, route groups, and file-based routing.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /harness-claude:next-app-router still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Structure Next.js 13+ applications using the App Router's file-system conventions for layouts, nested routes, and route segments
app/ directory conventions (layout.tsx, page.tsx, loading.tsx, error.tsx)app/. Each folder becomes a route segment; page.tsx makes it publicly accessible.layout.tsx to wrap route segments in shared UI — layouts persist across navigations and do not re-render.(groupName)/ to organize routes without affecting the URL path.[slug] for dynamic segments and [...catchAll] for catch-all segments. Access params via the params prop in page.tsx and layout.tsx.loading.tsx alongside page.tsx to stream a Suspense fallback during data fetching.error.tsx as a Client Component to catch runtime errors within the segment.not-found.tsx to render 404 UI and call notFound() from next/navigation to trigger it.template.tsx instead of layout.tsx when you need fresh state on every navigation (e.g., page-transition animations).layout.tsx Server Components by default; only add 'use client' if the layout needs interactivity.// app/dashboard/layout.tsx — shared layout for all /dashboard/* routes
export default function DashboardLayout({ children }: { children: React.ReactNode }) {
return (
<div className="flex">
<DashboardNav />
<main className="flex-1">{children}</main>
</div>
);
}
// app/dashboard/[teamId]/page.tsx — dynamic route segment
export default function TeamPage({ params }: { params: { teamId: string } }) {
return <h1>Team {params.teamId}</h1>;
}
The App Router replaces the Pages Router's getServerSideProps / getStaticProps model with React Server Components and async components. Every file in app/ is a Server Component by default.
File conventions: page.tsx (route UI), layout.tsx (shared wrapper), loading.tsx (Suspense fallback), error.tsx (error boundary), not-found.tsx (404), route.ts (API endpoint), template.tsx (per-navigation layout), default.tsx (parallel route fallback).
Route groups (groupName)/ exist only in the filesystem — they do not appear in the URL. Use them to co-locate files without coupling the URL structure.
Trade-offs:
searchParams prop in page.tsx insteadlayout.tsx is not re-mounted on navigation within its segment, so component state persists; use template.tsx if fresh state is neededMigration from Pages Router: Pages under pages/ continue to work alongside app/ — the two routers coexist during migration. Remove a page from pages/ only after its app/ equivalent is tested.
https://nextjs.org/docs/app/building-your-application/routing
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeRead when SKILL.md points to them.
793 skills in this plugin
/a11y-aria-patternsARIA Patterns> Apply ARIA roles, states, and properties correctly to enhance assistive technology support for custom widgets/a11y-color-contrastColor Contrast and Color Independence> Ensure sufficient color contrast ratios and never use color as the sole means of conveying information/a11y-form-patternsAccessible Form Patterns> Build accessible forms with proper labeling, grouped controls, inline validation, and clear error communicationOther plugins' skills for the same job