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 VoDaiLocz/kilo-kit-mcp --skill structured-outputsgit clone --depth 1 https://github.com/VoDaiLocz/kilo-kit-mcpWrote 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/vodailocz/kilo-kit-mcp/structured-outputs)<a href="https://agentmods.dev/skills/vodailocz/kilo-kit-mcp/structured-outputs"><img src="https://agentmods.dev/badge/skills/vodailocz/kilo-kit-mcp/structured-outputs/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/vodailocz/kilo-kit-mcp/structured-outputs"><img src="https://agentmods.dev/badge/skills/vodailocz/kilo-kit-mcp/structured-outputs.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.00048 | $0.01003 |
| Opus 5 | $0.00024 | $0.00502 |
| Sonnet 5 | $0.00010 | $0.00201 |
| Haiku 4.5 | $0.00005 | $0.00100 |
Grade A, and why
structured-outputs 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 8d 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 — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Structured Outputs & Type-Safe Extraction
Overview
The structured-outputs skill provides a framework for ensuring that language models produce data in deterministic, valid, and type-safe formats. This is essential for building robust AI-driven systems where LLM outputs must be consumed by downstream services, databases, or UI components.
When To Use
- When extracting structured data from unstructured text (e.g., invoices, logs, emails).
- When controlling tool call arguments to guarantee they meet internal API specifications.
- When you need to bridge the gap between non-deterministic LLM generation and deterministic software logic.
- Whenever you see developers relying on regex parsing of unstructured model text.
Core Concepts
- Schema Definition: Defining the expected structure using JSON Schema, Pydantic (Python), or Zod (TypeScript).
- Validation: Enforcing schema constraints at generation time or post-generation.
- Recovery: Handling failures gracefully using self-healing loops.
- Constraint Generation: Using techniques to force compliance during the generation process itself.
Patterns
1. Strict Schema Contracts
- Use Pydantic v2 for Python and Zod for TypeScript to create strongly-typed classes that represent your domain entities.
- Ensure all fields are explicitly defined with types and, where necessary, constraints (e.g.,
Field(min_length=1, ...)).
2. Parse-Validate-Retry (Instructor Pattern)
When an LLM fails to match the schema:
- Catch the validation error.
- Extract the specific path of the error (e.g.,
user.address.zipcode). - Re-prompt the model by injecting the original prompt, the failed output, and the validation error traceback.
- Goal: Enable the model to "self-heal" by correcting its own structural mistakes.
3. Token-Level Constrained Decoding (Outlines/CFG)
Instead of relying on retries, constrain the generation at the token level:
- Use Finite State Machines (FSM) to mask invalid tokens during the generation process.
- This guarantees 100% schema compliance by definition, effectively eliminating "JSON parsing errors".
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.
- 8d ago First seen · 73 lines · 48 tokens per session scan A b8190557c111
structured-outputs is a skill published in the GitHub repository VoDaiLocz/kilo-kit-mcp (26 stars, last pushed 4d ago), licensed Apache-2.0. It adds 48 tokens to every session and 1,003 once invoked, about $0.0002 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
llm-app-patterns
Production-ready patterns for building LLM applications, inspired by Dify and industry best practices.
llm-structured-output
Get reliable JSON, enums, and typed objects from LLMs using responseformat, tooluse, and schema-constrained decoding across OpenAI, Anthropic, and Google APIs.
local-llm-expert
Master local LLM inference, model selection, VRAM optimization, and local deployment using Ollama, llama.cpp, vLLM, and LM Studio. Expert in quantization formats (GGUF, EXL2) and local AI privacy.
gemini-api-integration
Use when integrating Google Gemini API into projects. Covers model selection, multimodal inputs, streaming, function calling, and production best practices.
llm-prompt-optimizer
Use when improving prompts for any LLM. Applies proven prompt engineering techniques to boost output quality, reduce hallucinations, and cut token usage.
gemini-api-dev
The Gemini API provides access to Google's most advanced AI models. Key capabilities include.