typebox
TypeBox patterns for runtime schema validation and JSON Schema generation. Use when mentioning TypeBox, Standard Schema, or schema-based validation.
Works with
Agent Skills format with YAML frontmatter. Claude Code reads it as-is.
---
name: "typebox"
description: "TypeBox patterns for runtime schema validation and JSON Schema generation. Use when mentioning TypeBox, Standard Schema, or schema-based validation."
license: "MIT"
---
# TypeBox
## Package Names
**Use `typebox`, not `@sinclair/typebox`**. The `@sinclair/typebox` package is deprecated.
```typescript
// Correct
import { Type } from 'typebox';
import { Compile } from 'typebox/compile';
import { Value } from 'typebox/value';
// Wrong - deprecated
import { Type } from '@sinclair/typebox';
```
## When to Use What
| Need | Use |
| --------------------------- | ------------------------------------ |
| Define schemas | `typebox` with `Type.*` |
| One-off validation | `Value.Check()` from `typebox/value` |
| High-performance validation | `Compile()` from `typebox/compile` |
TypeBox schemas are portable JSON Schema-shaped data. If a TypeBox boundary
needs validation, validate the TypeBox schema directly:
```typescript
import { Type } from 'typebox';
import { Compile } from 'typebox/compile';
import { Value } from 'typebox/value';
const schema = Type.Object({ name: Type.String(), age: Type.Number() });
Value.Check(schema, value); // boolean
const validator = Compile(schema);
validator.Check(value); // boolean
validator.Parse(value); // throws or returns typed value
```
## Standard Schema Boundary
TypeBox does not implement Standard Schema. Do not write TypeBox code that expects
`schema['~standard']`. If a boundary accepts Standard Schema, prefer Arktype or
another schema library that implements it natively. If a boundary owns TypeBox
schemas, keep the boundary TypeBox-native and use JSON Schema as the portable
representation.
## Repo Policy
Use TypeBox for portable schema objects: workspace tables, kv, fields, actions,
MCP inputs, manifests, and other surfaces that need JSON Schema shape,
metadata, `Static<>`, or schema inspection. Use Arktype for local runtime
validation, request parsing, env/config parsing, persisted UI state, transforms,
and branded domain values.
## References
- [TypeBox is a Beast](../../../docs/articles/typebox-is-a-beast.md)
- [The Schema Wars Just Shifted](../../../docs/articles/20260429T120000-typebox-standard-schema-pivot.md)More General & Other skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

