zod-json-schema

Installation
SKILL.md

Zod JSON Schema

Zod v4 has native z.toJSONSchema() for converting Zod schemas to JSON Schema. This skill covers the options, gotchas, and patterns for using it correctly.

Basic usage

import { z } from 'zod'

const schema = z.object({
  name: z.string(),
  age: z.number(),
})

z.toJSONSchema(schema)
// { type: 'object', properties: { name: { type: 'string' }, age: { type: 'number' } }, ... }
Installs
1
GitHub Stars
42
First Seen
Jun 23, 2026
zod-json-schema — remorses/opencode-config