Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Designs the Zod output schema of a Smithers Task as a typed, minimal contract between workflow steps.
45% 91%+45 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 10 of 22 without it.
3 of 3 safety checks passed
Not used yet
This skill is about one thing: the output schema, the Zod shape a <Task>
produces and the next step consumes: Smithers's contract between steps. The
runtime injects a JSON-schema description into the prompt, parses the response,
validates against Zod, retries on mismatch, and persists the row; everything
downstream (ctx.outputMaybe(...), <Branch>, <Loop until={...}>) reads that
row. A loose or prose-heavy schema makes every later step unreliable; a tight,
typed one makes the graph deterministic.
This is the BAML insight: the prompt is a schema. Don't beg the model for JSON in prose: declare the type and let the runtime enforce it, before you write the prompt or the workflow.
until,
where a wrong shape would silently break the run.Skip it when the output is terminal (nothing downstream reads it): a summary
string is fine.
Author the schema in createSmithers({...}) before the prompt or the graph.
Include only what downstream actually reads: a one-line summary plus the few
fields the next step indexes into. Every extra field is another thing the agent
can get wrong and another retry.
const { Workflow, smithers, outputs } = createSmithers({
triage: z.object({
summary: z.string(), // human-readable, terminal
severity: z.enum(["low", "medium", "high"]), // a <Branch> reads this
category: z.enum(["bug", "feature", "question"]), // routes to a specialist
needsHuman: z.boolean(), // gates an <Approval>
Next to this one in the catalogue, plus more from the same author.