nextjs-conventions · git:20261014.53504f8 · 2026-10-14 · sha256 1e3748eca58345d4
nextjs-conventions git:20261014.53504f8A
Immutable. This exact content never changes and is served at /api/v1/blob/1e3748eca58345d4.
No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_4scpqsy4dypy3cz6/1e3748eca58345d420c9ab2fa8426f6c4124ca3a7d214d3bc3af7673e873bf87.json
Then /plugin install nextjs-conventions@markdownregistry-4scpqsy4dypy3cz6 in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.
---
name: nextjs-conventions
description: "Next.js and web conventions: schema-validated input, Server Components by default, Server Actions with typed results, forward-only migrations, consented analytics. Use when writing or reviewing Next.js app code or next.config files."
---
# Shared Next.js and web conventions
- Validate every input from forms and APIs with a schema validator (for example Zod with `.safeParse()`).
- Default to Server Components. Use `'use client'` only for state or event handling.
- Prefer Server Actions over API routes when possible. Return `{ ok: true, data? } | { ok: false, error }`.
- Follow the project's migration policy; if it declares none, write forward-only migrations.
- Route analytics calls through the project's tracking wrapper when one exists, behind a consent gate where the platform requires consent.