Chalk Labs
Need help deploying zod-to-valibot?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/karlarao-zod-to-valibot
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
zod-to-valibot- Description
- None
- License
- MIT
- Instructions
- 51 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- missing YAML frontmatter
- name: missing
- description: missing
Files (3)
- EXAMPLES.md
- REFERENCE.md
- SKILL.md
SKILL.md (first lines)
# Zod to Valibot Migration
## Key differences
Zod uses **method chaining** (`z.string().email().min(5)`). Valibot uses **functional pipes** (`v.pipe(v.string(), v.email(), v.minLength(5))`). Every chain becomes a `v.pipe()` call.
Zod calls parse on the schema (`schema.safeParse()`). Valibot calls parse as a standalone function (`v.safeParse(schema, input)`).
## Workflow
1. **Install Valibot**:
- [ ] `npm install valibot` (or pnpm/bun equivalent)
2. **Try the automated codemod first** (handles ~80% of cases):
- [ ] `npx @valibot/zod-to-valibot --dry "src/**/*"` to preview
- [ ] `npx @valibot/zod-to-valibot "src/**/*"` to apply
- [ ] Review output for errors — codemod is beta and misses edge cases
3. **Fix what the codemod missed** — use [REFERENCE.md](REFERENCE.md) for the full API mapping
4. **Migrate validation wrappers** — any utility that accepts `z.ZodType` or calls `schema.safeParse()` needs updating. See [EXAMPLES.md](EXAMPLES.md) for a complete wrapper migration.
5. **Update imports**:
- [ ] Replace `import { z } from "zod"` with `import * as v from "valibot"`
- [ ] Replace `z.infer<typeof schema>` with `v.InferOutput<typeof schema>`
- [ ] Replace `z.input<typeof schema>` with `v.InferInput<typeof schema>`
6. **Verify**:
- [ ] Run type checker (`tsc --noEmit`)
- [ ] Run tests
- [ ] Remove `zod` from dependencies
## Critical gotchas
- `z.enum(['a','b'])` becomes `v.picklist(['a','b'])` — NOT `v.enum()`. Valibot's `v.enum()` is for native TS enums (Zod's `z.nativeEnum()`).
- `z.discriminatedUnion()` becomes `v.variant()`.
- `.default('x')` becomes the 2nd arg: `v.optional(v.string(), 'x')`.
- `safeParse` success returns `.output` not `.data`. Failure returns `.issues` not `.error`.
- `.pick({ a: true })` becomes `v.pick(schema, ['a'])` — keys as array, not object.
- `z.coerce.number()` becomes `v.pipe(v.unknown(), v.transform(Number))`.
- `.extend()` / `.merge()` become spread: `v.object({ ...base.entries, newField: v.string() })`.
- `v.partial()`, `v.pick()`, `v.omit()` CANNOT wrap a schema already in `v.pipe()` — apply them first, then pipe.
- Validation names change: `.min()` splits into `v.minLength()` (strings/arrays) vs `v.minValue()` (numbers).
- `.flatten().fieldErrors` becomes `v.flatten(result.issues).nested`.
- `z.ZodType` generic constraint becomes `v.GenericSchema`.
## Reference
- [REFERENCE.md](REFERENCE.md) — Complete API mapping table (every Zod method to Valibot equivalent)
- [EXAMPLES.md](EXAMPLES.md) — Before/after migration examples for common patternsFrom karlarao/afk, MIT.
More from karlarao/afk
- 0.507score
do-work
karlarao
Execute a unit of work end-to-end: plan, implement, validate with typecheck and tests, then commit.
SkillCFreshness: C★ 2Claude Code +9 - 0.502score
better-sqlite3-rebuild
karlarao
Use when seeing errors about better-sqlite3 native module, NODE_MODULE_VERSION mismatch, "was compiled against a different Node.js version", or similar native…
SkillCFreshness: C★ 2Claude Code +9 - 0.502score
pnpm-not-found
karlarao
Fix "pnpm command not found" errors by enabling corepack.
SkillCFreshness: C★ 2Claude Code +9 - 0.482score
design-an-interface
karlarao
Generate multiple radically different interface designs for a module using parallel sub-agents.
SkillCFreshness: C★ 2Claude Code +9 - 0.477score
grill-me
karlarao
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree.
SkillCFreshness: C★ 2Claude Code +9 - 0.270score
write-a-skill
karlarao
No description from the publisher yet.
SkillCFreshness: C★ 2Claude Code +9 - 0.270score
write-a-prd
karlarao
No description from the publisher yet.
SkillCFreshness: C★ 2Claude Code +9 - 0.270score
prd-to-issues
karlarao
No description from the publisher yet.
SkillCFreshness: C★ 2Claude Code +9 - 0.270score
afk
karlarao
No description from the publisher yet.
SkillCFreshness: C★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 2
- Open issues
- 0
- Last commit (this folder)
- May 8, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/karlarao/afk
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from karlarao
- 0.507score
do-work
karlarao
Execute a unit of work end-to-end: plan, implement, validate with typecheck and tests, then commit.
SkillCFreshness: C★ 2Claude Code +9 - 0.502score
better-sqlite3-rebuild
karlarao
Use when seeing errors about better-sqlite3 native module, NODE_MODULE_VERSION mismatch, "was compiled against a different Node.js version", or similar native…
SkillCFreshness: C★ 2Claude Code +9 - 0.502score
pnpm-not-found
karlarao
Fix "pnpm command not found" errors by enabling corepack.
SkillCFreshness: C★ 2Claude Code +9 - 0.482score
design-an-interface
karlarao
Generate multiple radically different interface designs for a module using parallel sub-agents.
SkillCFreshness: C★ 2Claude Code +9 - 0.477score
grill-me
karlarao
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree.
SkillCFreshness: C★ 2Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get zod-to-valibot running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
zod-to-valibot skill. Agent Mart. https://agentmart.dev/skills/karlarao-zod-to-valibot (last updated 2026-10-24)