typebox
A library pattern helper for runtime schema validation and data type mapping in TypeScript applications.
Install
mkdir -p .claude/skills/typebox && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4169" && unzip -o skill.zip -d .claude/skills/typebox && rm skill.zipInstalls to .claude/skills/typebox
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
TypeBox and TypeMap patterns for runtime schema validation and JSON Schema generation. Use when mentioning TypeBox, TypeMap, Standard Schema, or schema-based validation.Key capabilities
- →Define schemas using TypeBox Type.* methods
- →Perform one-off validation with Value.Check
- →Compile high-performance validators
- →Generate portable JSON Schema objects
- →Maintain schema-based validation boundaries
- →Inspect schema metadata and static types
How it works
It utilizes the typebox package to define schemas that are portable JSON Schema-shaped objects, providing methods for both simple validation and high-performance compilation.
Inputs & outputs
When to use typebox
- →Defining API request schemas
- →Validating input data at runtime
- →Translating schemas between validation libraries
- →Generating JSON schemas from code
About this skill
TypeBox
Package Names
Use typebox, not @sinclair/typebox. The @sinclair/typebox package is deprecated.
// 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:
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
When not to use it
- →When implementing Standard Schema interfaces
- →When performing local runtime request parsing
Limitations
- →Does not implement Standard Schema
- →Requires specific package naming conventions
How it compares
It mandates the use of the non-deprecated typebox package and enforces a clear separation between portable schema definitions and local runtime validation logic.
Compared to similar skills
typebox side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| typebox (this skill) | 2 | 2mo | No flags | Intermediate |
| drizzle | 238 | 2mo | No flags | Intermediate |
| zustand | 113 | 2mo | No flags | Intermediate |
| motion-canvas | 58 | 6mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by EpicenterHQ
View all by EpicenterHQ →You might also like
drizzle
lobehub
Drizzle ORM schema and database guide. Use when working with database schemas (src/database/schemas/*), defining tables, creating migrations, or database model code. Triggers on Drizzle schema definition, database migrations, or ORM usage questions.
zustand
lobehub
Zustand state management guide. Use when working with store code (src/store/**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.
motion-canvas
davila7
Complete production-ready guide for Motion Canvas with ESM/CommonJS workarounds, full setup templates, and troubleshooting for programmatic video creation using TypeScript
turborepo
vercel
Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.
shadcn-ui-setup
maneeshanif
Install and configure Shadcn/ui component library with Radix UI primitives, Aceternity UI effects, set up components, and manage the component registry. Use when adding Shadcn/ui to a Next.js project or installing specific UI components for Phase 2.
angular
sickn33
Modern Angular (v20+) expert with deep knowledge of Signals, Standalone Components, Zoneless applications, SSR/Hydration, and reactive patterns. Use PROACTIVELY for Angular development, component architecture, state management, performance optimization, and migration to modern patterns.