Rule TypeScript

Runtime Schema Validation

Use Zod or similar for runtime validation that generates types

typescriptvalidationruntime
CLAUDE.md

Use Zod or a similar library for runtime validation at system boundaries. Define the schema once and derive the TypeScript type from it. This eliminates drift between runtime validation and compile-time types.

Copy this block into your CLAUDE.md or agent config file to enforce it in your workflow.

get crystl