SKILL

structured-output

Force LLMs to emit valid, schema-constrained structured output: JSON modes, function calling, JSON Schema validation, and error recovery. Use for reliable data extraction.

Target: Target not categorized. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original English text

Topics in the source

  • Structured Output
  • Quick Start
  • When to Use
  • Best Practices
  • Schema Design
  • Mode Selection
  • Validation & Recovery
  • Dependencies

Getting LLMs to reliably emit valid, schema-constrained output. Data extraction into typed records API responses that must match a contract Tool/function arguments generation Reducing malformed-output handling Define a strict JSON Schema per output shape Use additionalProperties: false to reject surprises Keep schemas flat and primitive where possible Version schemas alongside your code Prefer the provider's responseformat (jsonobject / jsonschema) Use function/tool calling when the output feeds a tool Fall back to few-shot + validation for models without structured mode Never trust unvalidated text Validate every response against the schema Re-prompt with the validation error on failure Cap retries; fall back to a default record Log malformed responses for prompt tuning 1. Define the exact output shape as a JSON Schema. 2. Pick the strictest mode the provider supports (schema > jsonobject > few-shot). 3. Implement extraction with the schema attached. 4. Validate every response; re-prompt with errors on mismatch. 5. Add retry limits and safe defaults. 6. Log failures to improve the prompt or schema. 7. Add tests with realistic inputs including edge cases. 8. Version schemas and mon

This is an excerpt. Refer to the complete source and its current requirements.

Source repository
ssrjkk/agent-skills
Source file
.claude/skills/ai/structured-output/SKILL.md
Fixed revision
868975614072b553f929cb32c52c5e7dc4ba8734
Read the complete original documentation ↗

Requirements

  • Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.

A small first task

先阅读原作者说明,再决定是否在自己的 AI 工具中使用。

Instructions for your AI tool

Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: ssrjkk/agent-skills · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-11T03:01:42.194Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.