Install any skill in seconds. Free to start, no credit card required.
Get Started Free →hashintel/zod
Zod v4 TypeScript schema validation patterns and best practices.
Passed 21 of 22 test cases with the skill, and 8 of 22 without it.
and 15 more in the full report
13 fixed8 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 13 test cases the skill fixed. Same model, same prompt, with and without the skill.
Review this Zod schema snippet and fix any chain ordering bugs: z.string().meta({ label: "Username" }).min(3).max(20).optional(). Show the corrected TypeScript schema declaration.
| Checked | Without skill | With skill |
|---|---|---|
| Places .meta() at the end of the schema definition chain after .optional(). | Missed | Passed |
The instructions your model reads when the skill loads.
TypeScript-first schema validation library with static type inference. This skill covers v4 patterns including the metadata registry system.
Zod v4 stores metadata in registries (primarily z.globalRegistry). Use .meta() as the primary API and .describe() as shorthand for description-only cases.
IMPORTANT: Always call .meta()/.describe() last in the method chain. Methods like .min(), .optional(), .extend() return new schema instances, so metadata must be attached at the end.
// ✅ Correct - .meta() at end of chain
z.string()
.min(1)
.max(100)
.meta({ description: "User's full name", label: "Name" });
// ✅ Correct - .describe() shorthand for description only
z.string().email().describe("Primary email address");
// ❌ Wrong - metadata lost because .optional() creates new instance
z.string().meta({ description: "Lost!" }).optional();
Annotating object properties:
const userSchema = z.object({
email: z.string().email().meta({
description: "Used for login",
label: "Email Address",
placeholder: "[email protected]",
}),
age: z.number().min(0).describe("User's age in years"),
});
API guidance:
.meta(obj) for structured metadata (title, description, examples, UI hints)test cases passed, vs 8 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.