From Harness Web
Next.js App Router conventions — Server Components by default, leaf-node 'use client' boundaries, server-side data fetching with cache control, Server Actions for mutations, file-system routing, and the server/client import boundary. Use when building in the app/ directory or reviewing Next.js App Router code.
How this skill is triggered — by the user, by Claude, or both
Slash command
/harness-web:addon-nextjsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
All code targets the `app/` directory (App Router). The `pages/` directory is
All code targets the app/ directory (App Router). The pages/ directory is
legacy — do not create new files there.
Component model:
'use client' only when
you need browser APIs (window, document), event handlers, or React state/effects.'use client' boundaries as leaf nodes — move data-fetching ancestors to
the server side.Data fetching:
fetch API or ORM calls.
Do not use useEffect to load data — it runs on the client after hydration
and defeats server rendering.{ cache: 'force-cache' } for static, { cache: 'no-store' } for
dynamic, { next: { revalidate: N } } for ISR.Mutations:
'use server' functions, or files with 'use server' at top)
for all data writes. Invoke them from <form action={action}> or startTransition.revalidatePath / revalidateTag after a successful mutation.Routing:
app/page.tsx → /, app/blog/[slug]/page.tsx → /blog/:slug.layout.tsx persist across child routes; use template.tsx when
layout state must reset on navigation.loading.tsx wraps the route segment in <Suspense> automatically.Do not:
useEffect for side-effects — use event handlers
or form actions.server-only package to enforce this boundary at build time.npx claudepluginhub camilool8/harness-engineering-templates --plugin harness-webCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.