nextjs-conventions · git:20261024.8456bc0 · 2026-10-24 · sha256 1849b311a03b2919
nextjs-conventions git:20261024.8456bc0A
Immutable. This exact content never changes and is served at /api/v1/blob/1849b311a03b2919.
No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_4scpqsy4dypy3cz6/1849b311a03b29198b5377d4e6ba522168b20e64287ebcbc259e3e115ed3bd35.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: Apply Next.js conventions for schema-validated input, Server Components by default, Server Actions with typed results, forward-only migrations, and consented analytics. Use when writing or reviewing Next.js app code or next.config files.
license: MIT
compatibility: "Claude Code"
---
# 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 }`, where `error` is the `{ code, message, details? }` object from `developer-os:error-handling-conventions`.
- Follow the project's migration policy; if it declares none, write forward-only migrations.
- When the project has a `DESIGN.md`, record in `docs/decisions/` which side is the source of truth for tokens (`DESIGN.md` generating the Tailwind theme, or the reverse), and keep the other in sync.
- Route analytics calls through the project's tracking wrapper when one exists, behind a consent gate where the platform requires consent.