nextjs-conventions · git:20261015.eeda64b · 2026-10-15 · sha256 f829e8ac8013f8a7

nextjs-conventions git:20261015.eeda64bA

Immutable. This exact content never changes and is served at /api/v1/blob/f829e8ac8013f8a7.

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_4scpqsy4dypy3cz6/f829e8ac8013f8a7ab5e9723be3dd5c742763713a6bfd4111390d81c2cfcf6dc.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; Codex via scripts/install-codex.sh"
---

# 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.
- 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.