json-mode-patterns
Installation
SKILL.md
JSON Mode Patterns
Claude does not have a dedicated response_format: json parameter like some other APIs. The idiomatic way to get guaranteed JSON is tool use with a forced function call. This skill documents that pattern plus fallbacks.
Preferred Pattern: Tool-as-Schema
Define a tool whose input schema IS the JSON shape you want, then force the model to call it.