What problem does it solve? LLM responses are free-form text that breaks downstream code when parsed with regex or ad-hoc string handling. This Skill enforces strict JSON Schema guarantees on model generations so structured data reaches business logic without parsing failures. ## Core Features & Use Cases - Constrained Decoding: Configures provider-native structured output modes (OpenAI response_format with strict: true, Gemini responseSchema, or grammar constraints for vLLM/Ollama) to guarantee JSON syntax at the token level. - Dual-Layer Validation: Defines canonical schemas in Zod or Pydantic v2, then validates decoded payloads at runtime to enforce enum bounds and cross-field business invariants. - Bounded Repair Loops: Injects validation error diffs into one-turn repair prompts with a hard ceiling of 2 retries before returning a structured domain error. - Use Case: A backend service extracts order details from customer emails via an LLM. Use this Skill to guarantee every response matches the order schema, automatically repair rare failures, and never let malformed JSON reach the database layer. ## Quick Start Use the implement-structured-outputs skill to add strict JSON Schema validation and constrained decoding to my LLM integration in the orders service.