structured-output-and-tool-calling
Installation
SKILL.md
Structured Output & Tool Calling Reliability
The moment an LLM's output feeds deterministic code — a parser, a database write, a payment call — "usually valid" is a production incident waiting on a percentage. This skill is about closing that gap: making the structure guaranteed, the contents validated, the execution idempotent, and the failures recoverable.
Core mental model — three independent guarantees, do not conflate them:
- Structural validity (is it parseable JSON matching the schema shape?) — solved by constrained decoding.
- Semantic validity (are the values correct, in-range, referencing real things?) — solved only by validation + repair.
- Execution safety (does running it twice double-charge?) — solved only by idempotency.
Constrained decoding gives you #1 for free and nothing else. You still own #2 and #3.
1. Structured output: JSON mode vs constrained decoding
The single most important distinction in this whole skill: