typebox

Create JSON schemas with static type inference and runtime validators for TypeScript.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/brocef/skill-cefailures --skill typebox-brocef
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typebox
Source: https://github.com/brocef/skill-cefailures/tree/main/skills/typebox
Command: npx skills add https://github.com/brocef/skill-cefailures --skill typebox-brocef

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeBox bridges TypeScript types and JSON Schema, enabling reliable runtime validation, type inference, and schema generation across TypeScript projects.

Core Features & Use Cases

  • Runtime validators and parsing helpers that derive from schemas
  • Static type inference from schemas and seamless interoperability with TypeBox modules (TypeBuilder, Value, Compile, Script)
  • Practical use cases including API validation, data transformation, and schema-driven code generation

Quick Start

Install TypeBox, import Type from 'typebox', and start defining schemas with Type.Object and Type.String.

Frequently Asked Questions about typebox

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate JSON schemas and validate data at runtime in TypeScript?

To generate JSON schemas and validate data at runtime in TypeScript, you can define schemas using Type.Object and Type.String, which simultaneously enables static type inference and runtime validation.

What is the best way to derive static types from JSON schemas for API validation?

Deriving static types from JSON schemas for API validation is best achieved by constructing schemas that bridge TypeScript types and JSON Schema, enabling seamless type inference and runtime checks.

Can I use TypeBox modules for schema-driven code generation and data transformation?

Yes, you can use TypeBox modules like TypeBuilder, Value, Compile, and Script for schema-driven code generation, data transformation, and API validation with seamless interoperability.

Does TypeBox require YAML frontmatter for schema construction and runtime validation?

TypeBox enforces a YAML frontmatter with name and description for its internal guidance, but schema construction and runtime validation rely on importing Type and defining structures like Type.Object.

Why use JSON Schema for runtime validation instead of standard TypeScript types?

Standard TypeScript types are erased at runtime, whereas using JSON Schema for runtime validation bridges this gap, ensuring reliable data parsing and type inference across TypeScript projects.