Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add sigistry/marketplace --skill structured-outputgit clone --depth 1 https://github.com/sigistry/marketplaceWrote 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/sigistry/marketplace/structured-output)<a href="https://agentmods.dev/skills/sigistry/marketplace/structured-output"><img src="https://agentmods.dev/badge/skills/sigistry/marketplace/structured-output.svg" alt="Measured on agentmods" height="20"></a>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.00089 | $0.01085 |
| Opus 5 | $0.00044 | $0.00543 |
| Sonnet 5 | $0.00018 | $0.00217 |
| Haiku 4.5 | $0.00009 | $0.00109 |
Grade A, and why
structured-output 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 5d 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 — 44 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Structured Output
Purpose
Standardize how an LLM app gets machine-readable output it can trust. Asking a model for JSON in the prompt and calling JSON.parse / json.loads on the result fails on a non-trivial fraction of calls, a stray markdown fence, a trailing comma, a hallucinated field, an unescaped quote, and those failures surface as production exceptions on a code path that "worked in testing." Provider-native structured output (schema-constrained decoding or strict tool schemas) drops the invalid-output rate by one to two orders of magnitude. This skill gives the decision order: use the strongest native mechanism the provider offers, validate every response against a schema, and wrap it in a bounded retry-with-error-feedback loop.
The reliability ladder (strongest first)
- Schema-constrained output: the provider constrains decoding to your JSON Schema, guaranteeing the response validates. Anthropic
output_config.format(json_schema), OpenAIresponse_format: json_schemawithstrict: true, Gemini/VertexresponseSchema. Use this whenever the model supports it. - Strict tool / function schema: when the value is really an argument to an action, route it through a tool with
strict: trueandadditionalProperties: false. The provider validates the tool input against the schema. - Bare JSON mode:
{"type": "json_object"}/ "json" mode guarantees syntactically valid JSON but not your schema. Only acceptable with validation + retry on top. - Prompt-and-pray: "respond only with JSON" and hope. Never rely on this; it is the pattern this skill exists to replace.
Always add layers 1–3 with the validate-and-retry loop below, native constraints can still be interrupted by a length cap or a refusal.
The non-negotiable pair: validate, then retry with feedback
Even with native constraints, parse defensively:
- Define the schema once (Zod / Pydantic / JSON Schema) and reuse it for both the request constraint and the response check.
- Validate every response against it, never trust a raw parse.
- On a validation failure, retry a bounded number of times, feeding the validator's error message back into the next request ("your previous output failed validation: ; return output matching the schema"). This self-correction recovers most transient failures.
- Cap the attempts and surface a typed failure when exhausted, an unbounded correction loop is a cost and latency hazard.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 5d ago First seen · 44 lines · 89 tokens per session scan A b3cd55cf1481
structured-output is a skill published in the GitHub repository sigistry/marketplace (3 stars, last pushed 4d ago), licensed MIT. It adds 89 tokens to every session and 1,085 once invoked, about $0.0004 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-09-03.
Other skills, from other repositories
nano-banana-prompting
This skill should be used when crafting prompts for Nano Banana Pro (Gemini image generation). Use when users want help writing image generation prompts, need guidance on prompt structure, or want to optimize their prompts for better results.
nano-banana
This skill should be used for Python scripting and Gemini image generation. Use when users ask to generate images, create AI art, edit images with AI, or run Python scripts with uv. Trigger phrases include "generate an image", "create a picture", "draw", "make an image of", "nano banana", or any image generation…
seedance-prompter
Expert prompt engineering for Seedance 2.0. Use when the user wants to generate a video with multimodal assets (images, videos, audio) and needs the best possible prompt.
gemini-prompting
Internal guidance for composing Gemini prompts for coding, review, diagnosis, and research tasks inside the Gemini Claude Code plugin.
skill-meta-prompt
Craft better prompts using proven optimization techniques — use when your prompt needs refinement.
architecture-optimization
Guided journey from a working codebase grown slow and tangled to one measurably fast, cleanly bounded, and readable. Orchestrates eight skills phase by phase - working-with-legacy-code, clean-architecture, software-design-philosophy, refactoring-patterns, system-design, ddia-systems, release-it, pragmatic-programmer …