Schema

Validate and transform external data with Effect Schema.

8|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/andrueandersoncs/claude-skill-effect-ts --skill schema-andrueandersoncs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Schema
Source: https://github.com/andrueandersoncs/claude-skill-effect-ts/tree/main/skills/schema
Command: npx skills add https://github.com/andrueandersoncs/claude-skill-effect-ts --skill schema-andrueandersoncs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Effect Schema enables type-safe runtime validation and bidirectional data transformation for Effect-based applications, reducing runtime errors when consuming external data and ensuring consistent data shapes across boundaries.

Core Features & Use Cases

  • Type-safe runtime validation with TypeScript inference.
  • Bidirectional decoding and encoding between external payloads and internal types.
  • Class-based and tagged schemas for ergonomic modeling and exhaustive matching.
  • JSON Schema interoperability and utilities like Schema.parseJson for safe JSON parsing.
  • Rich, customizable error messages and annotation support for self-documenting schemas.
  • Seamless error handling with Effect integration and typed errors.

Quick Start

Validate a JSON payload against a simple Schema.Struct({ id: Schema.Number, name: Schema.String }) and decode it into a typed object using Schema.decodeUnknownSync, returning either the typed value or a ParseError.

Frequently Asked Questions about Schema

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

FAQPage Schema
How do I validate and transform external JSON payloads in a type-safe way with Effect?

Type-safe runtime validation with Effect Schema decodes unknown data into typed objects using composable schemas, enforcing typed errors and bidirectional transformations for external JSON payloads within Effect applications.

Can I generate JSON Schema from my TypeScript types for interoperability?

JSON Schema interoperability is supported natively, allowing you to generate standard JSON Schema representations from your defined Effect Schema structures for broader integration across different services and tools.

How do I decode a JSON payload into a typed object using Effect Schema?

To decode a JSON payload, you define a Schema.Struct and pass the external data to Schema.decodeUnknownSync, which returns either the successfully validated typed value or a ParseError.

Does Effect Schema support bidirectional data transformation between external payloads and internal types?

Effect Schema supports bidirectional decoding and encoding, enabling seamless transformation between external payloads and internal TypeScript types while maintaining strict type inference and customizable error messages.

What is the best way to handle typed errors during schema validation in Effect programs?

Schema validation in Effect programs handles errors natively by returning typed ParseError objects, integrating directly with Effect's error management system to ensure predictable and composable error handling.