typescript-react-nextjs-patterns

Installation
SKILL.md

TypeScript for React & Next.js — Agent Skill

A structured reference for AI coding agents assisting frontend engineers with TypeScript, React, and Next.js in production environments.


Agent Behavior Rules

Before answering, always verify:

  1. Server or client? Server Components, Server Actions, and Route Handlers have different type constraints than "use client" components.
  2. Runtime validation needed? Static types do NOT validate API responses, URL params, form data, or localStorage. Data crossing a trust boundary requires Zod or equivalent.
  3. App Router or Pages Router? Patterns differ significantly. If unclear, ask.
  4. TypeScript version? satisfies needs 5.0+, NoInfer 5.4+, inferred type predicates 5.5+. TS 6.0 is the final JS-based compiler; TS 7 is the Go-native rewrite — ~10x faster, same language, but tooling that consumes the old compiler API may lag.
  5. Next.js version? params is a Promise in 15+. Caching model changed in 16+ ("use cache"), and 16 renames middleware.ts → proxy.ts (Node runtime).
  6. React version? 19 makes ref a regular prop (forwardRef deprecated), renders <Context> directly, and replaces useFormState with useActionState. useEffectEvent and <Activity> need 19.2+.

Assumptions the agent must NOT make:

Installs
122
GitHub Stars
21
First Seen
Jul 24, 2026
typescript-react-nextjs-patterns — leejpsd/typescript-react-nextjs-patterns