Skip to content
Back to skills

Structured Output

ASecurity

Consume model-generated JSON or typed responses with schema validation, semantic checks, bounded repair, and independent authorization for actions.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 13, 2026
ai-agentsrustgogitdocumentation

Security analysis

A100/100

Scanned October 13, 2026

npx -y skills add sujith011/agentic-pro-skills --skill structured-output --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Structured Output?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Structured Output
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sujith011-structured-output/badge)](https://www.skillsdirectory.com/skills/sujith011-structured-output)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: structured-output
description: "Consume model-generated JSON or typed responses with schema validation, semantic checks, bounded repair, and independent authorization for actions."
---

# Structured Output

## Process
1. Define the consumer's required schema and business invariants: units, ranges, allowed transitions, references, and treatment of missing information.
2. Check the selected provider/model's current structured-output support in official documentation. Prefer supported constrained output when useful, while handling refusal, truncation, timeout, and transport errors distinctly.
3. Parse and validate at the trust boundary. Reject unexpected fields where appropriate and distinguish invalid syntax, schema mismatch, and semantically wrong values.
4. Validate claims against trusted context. A valid object may contain an invented identifier or wrong amount. Model-generated permission, destination, and action fields do not authorize execution.
5. Bound repair/retry by attempts, deadline, and cost. Keep side effects outside retries; ambiguous external results require reconciliation.
6. Test empty/refused/truncated output, missing/extra fields, invalid references, malicious instructions, and valid-looking business-rule violations. Log sanitized diagnostics rather than unrestricted prompts/responses.

## Example
An invoice extraction returns valid JSON with a negative payable amount and an invented bank account. Reject the business-rule violations and never initiate a transfer from those fields.

## Stop conditions
Do not turn parsing failure into a fabricated default value. Schema conformance is only one acceptance condition, not proof of correctness or authorization.

## Evidence
- Schema and independent semantic rules.
- Failure-category and repair-budget checks.
- Consumer behavior and privacy-aware diagnostics.

## Reference
Workflow independently written after reviewing [llm-structured-output](https://github.com/sickn33/agentic-awesome-skills/blob/cb30121a2dfd007531bd2fbefb56f68de927da6a/skills/llm-structured-output/SKILL.md).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.