Data validation

From rnavarych/alpha-engineer · View interactive version

Data validation is an AI agent skill from the GitHub repository rnavarych/alpha-engineer. Implements data validation using Zod, Joi, class-validator, Pydantic, and JSON Schema. Covers request/response DTOs, input sanitization, type coercion, custom validators, validation middleware, and error formatting. Use when validating API inputs, defining data contracts, building form validators, o

How to use this skill

Skill file

Data Validation

When to use

Core principles

  1. Validate at every boundary — controller, service, and database layer each catch different bugs
  2. Fail fast, fail completely — collect all errors in one pass, never return partial error lists
  3. Strip the unknown — deny unrecognized fields by default to prevent mass assignment
  4. Explicit coercion only — document what converts and what rejects; silent coercion hides bugs
  5. Schemas are shared contracts — reuse across frontend and backend via monorepo packages

Reference Files

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.