Paste a posthog event JSON payload and get a Valibot v.object schema you can run inside your handler. Smaller bundle than Zod, same boundary guarantee — useful for Cloudflare Workers, Vercel Edge, and any runtime where bundle size matters.
PostHog events mix SDK-injected $-prefixed keys with your own custom property names. A parse at the destination (warehouse loader, server-side capture forwarder, webhook export consumer) catches an SDK upgrade adding a field your downstream column doesn't know how to write.
PostHog's batch /capture endpoint can land in a Cloudflare Worker for at-edge filtering; Valibot's per-primitive tree-shaking lets the worker validate every event in the batch with a tiny memory footprint, important when batches reach hundreds of events. The output is a copy-paste-runnable v.object using the canonical namespace import (import * as v from "valibot"); only the primitives your shape actually uses (v.string, v.number, v.array, v.union, v.optional) get pulled in.