structured-output

structured-output is a skill for Claude Code, Codex from NicolaiLassen/orxhestra. It costs 25 tokens per session (364 once invoked), scanned A, original, Apache-2.0.

A skill for making orxhestra agents return structured Pydantic objects instead of free-form text. Pydantic is a Python library for validating data against defined fields and types.

In plain words
What is it for?
Use it to define typed outputs such as analyses with named fields, then access the validated object from the agent's response.
Why use it?
It makes agent results predictable and easier for programs to read and use.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to define typed outputs such as analyses with named fields, then access the validated object from the agent's response.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nicolailassen/orxhestra/structured-output
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add NicolaiLassen/orxhestra --skill structured-output
Clone the repo
git clone --depth 1 https://github.com/NicolaiLassen/orxhestra

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for structured-output

README.md
[![agentmods](https://agentmods.dev/badge/skills/nicolailassen/orxhestra/structured-output/github.svg)](https://agentmods.dev/skills/nicolailassen/orxhestra/structured-output)
Your own site
<a href="https://agentmods.dev/skills/nicolailassen/orxhestra/structured-output"><img src="https://agentmods.dev/badge/skills/nicolailassen/orxhestra/structured-output/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for structured-output

Your own site · 80×15
<a href="https://agentmods.dev/skills/nicolailassen/orxhestra/structured-output"><img src="https://agentmods.dev/badge/skills/nicolailassen/orxhestra/structured-output.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 364 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.00364
Opus 5 $0.00013 $0.00182
Sonnet 5 $0.00005 $0.00073
Haiku 4.5 $0.00003 $0.00036

Measured 10d ago against content hash ba7d1d1e36ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

structured-output scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/skills/structured-output/SKILL.md · 47 lines

What it actually says

Structured Output

Pass output_schema to LlmAgent to get a typed Pydantic object back.

from pydantic import BaseModel, Field
from orxhestra import LlmAgent
from orxhestra.events.event import Event, EventType

class CompanyAnalysis(BaseModel):
    name: str = Field(description="Company name")
    industry: str = Field(description="Primary industry")
    strengths: list[str] = Field(description="Key strengths")
    risks: list[str] = Field(description="Key risks")
    recommendation: str = Field(description="Buy, Hold, or Sell")
    confidence: float = Field(description="Confidence score 0-1")

agent = LlmAgent(
    name="AnalystAgent",
    model=model,
    tools=[get_financials, get_news_sentiment],
    output_schema=CompanyAnalysis,
    instructions="You are a financial analyst.",
)

Accessing the parsed object

async for event in agent.astream("Analyze Apple", ctx=ctx):
    if event.is_final_response():
        analysis = event.data  # CompanyAnalysis instance
        print(f"{analysis.name}: {analysis.recommendation} ({analysis.confidence:.0%})")

How it works

  1. PydanticOutputParser.get_format_instructions() is appended to the system prompt.
  2. PydanticOutputParser.parse() extracts and validates JSON from the response.
  3. If direct parsing fails, with_structured_output() is used as a fallback.
  4. Works with streaming and multi-agent compositions.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 47 lines · 25 tokens per session scan A ba7d1d1e36ee

Subscribe to this mod's changes

structured-output is a skill published in the GitHub repository NicolaiLassen/orxhestra (21 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 25 tokens to every session and 364 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

prompt-cache-agent-harness

Plan and inspect prompt-cache behavior for long-running Claude agent loops. Use when a user wants to split stable tool, system, and history context into cacheable layers, compare captured cache metadata, estimate cost impact from supplied pricing inputs, or keep durable memory outside the cached prefix.

Prompthon-IO/agent-systems-handbook · 61 tokens

ai-native-development

Build AI-first applications with RAG pipelines, embeddings, vector databases, agentic workflows, and LLM integration. Master prompt engineering, function calling, streaming responses, and cost optimization for 2025+ AI development.

ArieGoldkin/ai-agent-hub · 48 tokens

guidance

Control LLM output with regex and grammars, guarantee valid JSON/XML/code generation, enforce structured formats, and build multi-step workflows with Guidance - Microsoft Research's constrained generation framework.

braxtonROSE4/zorro-agent · 38 tokens

godmode

Jailbreak API-served LLMs using G0DM0D3 techniques — Parseltongue input obfuscation (33 techniques), GODMODE CLASSIC system prompt templates, ULTRAPLINIAN multi-model racing, encoding escalation, and Zorro-native prefill/system prompt integration. Use when a user wants to bypass safety filters, jailbreak a model, or…

braxtonROSE4/zorro-agent · 83 tokens

omni-compression

Configure RTK (command output), Caveman (prose), and stacked compression modes. Manage language packs, custom rules, and test prompt compression reducing tokens by 60–90%.

diegosouzapw/OmniRoute · 42 tokens

cli-compression

Configure and test prompt compression from the CLI. Manage RTK filters, Caveman rules, stacked compression modes, and preview compression output with real prompts.

diegosouzapw/OmniRoute · 34 tokens