
Valibot
Validate forms, API payloads, and config with Valibot’s pipe-based schemas and stay type-safe without confusing Zod syntax.
Overview
Valibot is an agent skill for the Build phase that helps you author modular Valibot schemas, parse inputs correctly, and avoid Zod API mistakes.
Install
npx skills add https://github.com/open-circle/agent-skills --skill valibotWhat is this skill?
- Modular Valibot schemas with pipe-based validators instead of Zod-style method chains
- Explicit Zod versus Valibot API table to prevent mixed imports and wrong parse signatures
- Guidance for parse, safeParse-style flows, and user-input validation in TypeScript projects
- Migration path from Zod to Valibot when shrinking bundle size or adopting modular validators
- Type-safe structural validation aligned with valibot.dev patterns
- Documented Zod versus Valibot comparison table covering import style, pipelines, and parse call shape
Adoption & trust: 738 installs on skills.sh; 14 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need trustworthy validation in TypeScript but agents keep mixing Zod chains with Valibot or calling parse with the wrong argument order.
Who is it for?
Indie SaaS and API builders adopting Valibot for forms, env parsing, or request bodies who want agent-guided schema work without Zod confusion.
Skip if: Projects already standardized on Zod with no migration plan, or runtimes where Valibot is not a project dependency.
When should I use this skill?
User needs schema validation with Valibot, creating or modifying schemas, parsing inputs, migrating from Zod, or mentions Valibot, schema, or validation.
What do I get? / Deliverables
You get correct `v.pipe` schemas, reliable parsing calls, and migration-ready patterns aligned with Valibot’s documented API.
- Valibot schema definitions using v.pipe compositions
- Parse and validation helpers wired to project entrypoints
Recommended Skills
Journey fit
Input validation is implemented during backend and API construction, not as a standalone launch or growth task. Schemas, parsing, and safe parsing patterns belong on the backend shelf where structural data is accepted and transformed.
How it compares
Library-focused validation skill for Valibot’s pipe API—not a generic ‘pick Zod or Valibot’ product strategy doc.
Common Questions / FAQ
Who is valibot for?
Solo builders shipping TypeScript backends or full-stack apps who chose Valibot for modular, type-safe structural validation.
When should I use valibot?
Use it during Build backend work when creating schemas, validating user input, parsing API payloads, or migrating from Zod to Valibot.
Is valibot safe to install?
Check the Security Audits panel on this Prism page for MIT license metadata and audit signals; review generated validation code before it touches production data paths.
SKILL.md
READMESKILL.md - Valibot
# Valibot This skill helps you work effectively with [Valibot](https://valibot.dev), the modular and type-safe schema library for validating structural data. ## When to use this skill - When the user asks about schema validation with Valibot - When creating or modifying Valibot schemas - When parsing or validating user input - When the user mentions Valibot, schema, or validation - When migrating from Zod to Valibot ## CRITICAL: Valibot vs Zod — Do Not Confuse! **Valibot and Zod have different APIs. Never mix them up!** ### Key Differences | Feature | Zod ❌ | Valibot ✅ | | ------------------- | ------------------------------------- | --------------------------------------------------------- | | Import | `import { z } from 'zod'` | `import * as v from 'valibot'` | | Validations | Chained methods: `.email().min(5)` | Pipeline: `v.pipe(v.string(), v.email(), v.minLength(5))` | | Parsing | `schema.parse(data)` | `v.parse(schema, data)` | | Safe parsing | `schema.safeParse(data)` | `v.safeParse(schema, data)` | | Optional | `z.string().optional()` | `v.optional(v.string())` | | Nullable | `z.string().nullable()` | `v.nullable(v.string())` | | Default | `z.string().default('x')` | `v.optional(v.string(), 'x')` | | Transform | `z.string().transform(fn)` | `v.pipe(v.string(), v.transform(fn))` | | Refine/Check | `z.string().refine(fn)` | `v.pipe(v.string(), v.check(fn))` | | Enum | `z.enum(['a', 'b'])` | `v.picklist(['a', 'b'])` | | Native enum | `z.nativeEnum(MyEnum)` | `v.enum(MyEnum)` | | Union | `z.union([a, b])` | `v.union([a, b])` | | Discriminated union | `z.discriminatedUnion('type', [...])` | `v.variant('type', [...])` | | Intersection | `z.intersection(a, b)` | `v.intersect([a, b])` | | Min/max length | `.min(5).max(10)` | `v.minLength(5), v.maxLength(10)` | | Min/max value | `.gte(5).lte(10)` | `v.minValue(5), v.maxValue(10)` | | Infer type | `z.infer<typeof Schema>` | `v.InferOutput<typeof Schema>` | | Infer input | `z.input<typeof Schema>` | `v.InferInput<typeof Schema>` | ### Common Mistakes to Avoid ```typescript // ❌ WRONG - This is Zod syntax, NOT Valibot! const Schema = v.string().email().min(5); const result = Schema.parse(data); // ✅ CORRECT - Valibot uses functions and pipelines const Schema = v.pipe(v.string(), v.email(), v.minLength(5)); const result = v.parse(Schema, data); ``` ```typescript // ❌ WRONG - Zod-style optional const Schema = v.object({ name: v.string().optional(), }); // ✅ CORRECT - Valibot wraps with optional() const Schema = v.object({ name: v.optional(v.string()), }); ``` ```typescript // ❌ WRONG - Zod-style default const Schema = v.string().default("hello"); // ✅