Agent skill · writing content · sickn33

llm-structured-output

Get reliable JSON, enums, and typed objects from LLMs using response_format, tool_use, and schema-constrained decoding across OpenAI, Anthropic, and Google APIs.

Why this skill is useful

Provides domain-specific knowledge on structured data extraction techniques from various LLM APIs that the AI wouldn't reliably generate on its own.

What it needs

About 9k tokens when loaded. Last updated 2026-08-07. 44,571 stars on the source repository.

What this skill does

LLM Structured Output What This Skill Does Extract typed, validated data from LLM API responses instead of parsing free-text. This skill covers the three main approaches: OpenAI's responseformat with JSON Schema, Anthropic's tooluse block for structured extraction, and Google's responseSchema in Gemini. You will learn when each approach works, when it breaks, and how to build retry logic around schema validation failures that every production system encounters. When to Use This Skill The user needs to extract structured data (JSON objects, arrays, enums) from an LLM response The user is building a pipeline where LLM output feeds directly into code (database writes, API calls, UI rendering) The user asks about responseformat, jsonmode, jsonobject, or jsonschema in OpenAI The user asks about using Anthropic's tooluse or toolresult blocks for data extraction (not for actual tool execution) The user asks about Zod schemas with zodResponseFormat() from the openai npm package The user needs to parse LLM output into Pydantic models using instructor, marvin, or manual validation The user is getting malformed JSON, missing fields, or wrong types from LLM responses and needs a fix The user asks about controlled generation, constrained decoding, or grammar-based sampling in local models Do NOT use this skill when: The user wants free-form text generation (summaries, essays, chat) The user is asking about Zod for form validation or API input validation (use zod-validation-expert instead) The user needs prompt engineering for better text quality (not structure) The user wants to call real external tools/APIs (this skill covers using tooluse as a structured output hack, not actual tool orchestration) Core Workflow 1. Identify the target schema. Ask the user what fields they need extracted. Define every field with its type, whether it's required or optional, and valid enum values if applicable. Do not proceed without a concrete schema. 2. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills sickn33/llm-structured-output--0ed38b

View the source on GitHub

Browse the @skills marketplace