Borrowing it
Nothing to install: this file belongs to growthxai/output. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/growthxai/output/main/.claude/skills/llm-output-schema-constraints/SKILL.mdgit clone --depth 1 https://github.com/growthxai/outputWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/growthxai/output/llm-output-schema-constraints)<a href="https://agentmods.dev/skills/growthxai/output/llm-output-schema-constraints"><img src="https://agentmods.dev/badge/skills/growthxai/output/llm-output-schema-constraints/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/growthxai/output/llm-output-schema-constraints"><img src="https://agentmods.dev/badge/skills/growthxai/output/llm-output-schema-constraints.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00053 | $0.00584 |
| Opus 5 | $0.00026 | $0.00292 |
| Sonnet 5 | $0.00011 | $0.00117 |
| Haiku 4.5 | $0.00005 | $0.00058 |
Grade A, and why
llm-output-schema-constraints scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Schema Constraints for LLM Structured Output
When using aiSdk.Output.object() with generateText, the Zod schema is converted to JSON Schema and sent to the LLM provider as a tool definition. Anthropic does not support many JSON Schema constraints, which means certain Zod methods will cause errors or be silently ignored when the schema is sent to the provider.
Unsupported constraints in LLM output schemas
Numbers: .min(), .max() on z.number() produce minimum/maximum — rejected by Anthropic.
Arrays: .min(), .max(), .length() on z.array() produce minItems/maxItems — Anthropic only supports minItems of 0 or 1. Any other value (e.g. .length(3), .min(2)) will be rejected.
Rule: Use .describe() instead of numeric/array constraints for LLM output schemas
import { aiSdk } from '@outputai/llm';
// LLM output schema - sent to provider via aiSdk.Output.object()
output: aiSdk.Output.object( {
schema: z.object( {
score: z.number().describe( 'Quality score 0-100' ),
predictions: z.array( predictionSchema ).describe( 'Exactly 3 predictions' )
} )
} )
// Workflow/evaluator validation schema - Zod-only, NOT sent to LLM
export const workflowOutputSchema = z.object( {
score: z.number().min( 0 ).max( 100 ).describe( 'Quality score 0-100' ),
predictions: z.array( predictionSchema ).length( 3 ).describe( 'Exactly 3 predictions' )
} );
When to use which
| Context | .min()/.max()/.length() |
.describe() |
|---|---|---|
Schema passed to aiSdk.Output.object() |
No (numbers or arrays) | Yes |
inputSchema / outputSchema on workflows |
OK | Optional |
outputSchema on evaluators |
OK | Optional |
workflowOutputSchema in types.ts |
OK | Optional |
The .describe() annotation guides the LLM on expected ranges and counts. The .min()/.max()/.length() constraints are for runtime Zod validation only and should be used on schemas that validate data within your application, not schemas sent to LLM providers.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago Changed · +2 lines · +4 tokens per session e566bd1bff7d
- 11d ago First seen · 46 lines · 49 tokens per session scan A fcefd32c4e31
llm-output-schema-constraints is a skill published in the GitHub repository growthxai/output (435 stars, last pushed today), licensed Apache-2.0. It adds 53 tokens to every session and 584 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
system-prompts
Write system prompts, tool docs, and agent definitions. Project tag conventions + RFC 2119 keywords + dense compression. Use when authoring or editing any prompt the model reads.
ax-ai
This skill helps an LLM generate correct AI provider setup and configuration code using @ax-llm/ax. Use when the user asks about ai(), providers, models, routing, adaptive balancing, presets, embeddings, batch audio with ai.transcribe() or ai.speak(), extended thinking, context caching, or mentions…
ax-agent-rlm
This skill helps an LLM generate correct AxAgent RLM/runtime code using @ax-llm/ax. Use when the user asks about RLM code execution, AxJSRuntime, contextFields, contextPolicy, liveRuntimeState, promptLevel, stage prompt controls, executorModelPolicy, maxRuntimeChars, agent.test(...), llmQuery(...), recursionOptions…
ax-flow
This skill helps an LLM generate correct AxFlow workflow code using @ax-llm/ax. Use when the user asks about flow(), AxFlow, workflow orchestration, parallel execution, DAG workflows, conditional routing, map/reduce patterns, or multi-node AI pipelines.
ax-gen
This skill helps an LLM generate correct AxGen code using @ax-llm/ax. Use when the user asks about ax(), AxGen, generators, forward(), streamingForward(), validation, assertions, streaming assertions, field processors, step hooks, self-tuning, or structured outputs. For MCP clients, transports, prompts, resources…
ax-signature
This skill helps an LLM generate correct DSPy signature code using @ax-llm/ax. Use when the user asks about signatures, s(), f(), field types, string syntax, fluent builder API, validation constraints, or type-safe inputs/outputs.