agentsop-structured-output-picker

agentsop-structured-output-picker is a skill for Claude Code, Codex from agentsope/SkillAlchemy. It costs 105 tokens per session (5,428 once invoked), scanned A, original, MIT.

A decision guide for making language-model output follow a required structure, such as a typed object or JSON. It compares constraining generation with Outlines, validating and retrying with Instructor, and using grammars with Guidance, then helps choose how failures should be handled.

In plain words
What is it for?
Use it after choosing an output format to select an enforcement library and decide whether invalid output should cause a hard failure or a softer retry.
Why use it?
It prevents malformed model responses from breaking the code that consumes them and makes the trade-offs between strict failure and graceful recovery explicit.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: reads .claude/ paths; built for aider.

Good fit Use it after choosing an output format to select an enforcement library and decide whether invalid output should cause a hard failure or a softer retry.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agentsope/skillalchemy/agentsop-structured-output-picker
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 agentsope/SkillAlchemy --skill agentsop-structured-output-picker
Clone the repo
git clone --depth 1 https://github.com/agentsope/SkillAlchemy

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 agentsop-structured-output-picker

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentsope/skillalchemy/agentsop-structured-output-picker/github.svg)](https://agentmods.dev/skills/agentsope/skillalchemy/agentsop-structured-output-picker)
Your own site
<a href="https://agentmods.dev/skills/agentsope/skillalchemy/agentsop-structured-output-picker"><img src="https://agentmods.dev/badge/skills/agentsope/skillalchemy/agentsop-structured-output-picker/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 agentsop-structured-output-picker

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentsope/skillalchemy/agentsop-structured-output-picker"><img src="https://agentmods.dev/badge/skills/agentsope/skillalchemy/agentsop-structured-output-picker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,428 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 364
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 366
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 368
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
How audits are shown
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.00105 $0.05428
Opus 5.5 $0.00042 $0.02171
Sonnet 5.5 $0.00021 $0.01086
Haiku 4.5 $0.00011 $0.00543

Measured 1mo ago against content hash dc3c3913fd51, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agentsop-structured-output-picker 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 1mo 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.

skills/agentsop-structured-output-picker/SKILL.md · 386 lines

How it starts

The opening of the file, as written. The whole thing — 386 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Structured-Output-Picker — 在解码处约束,还是在校验处约束?

One-liner: Three local libraries (Outlines, Instructor, Guidance) plus provider-native structured outputs all "make the model emit valid structure", but they enforce at different points and fail differently. Pick by how costly a malformed output is and whether you control the decoder. Then pick the failure stance — Assert (hard-fail + retry) vs Suggest (soft nudge, degrade gracefully) — borrowed from DSPy's constraint primitives.

This is an ENHANCE overlay. The four enforcement mechanisms each have a working local skill; what no single one provides is the cross-library *which-one

  • how-to-handle-failure* decision. That gap is hit every time an LM output is consumed by code. For what shape the content should take (code vs JSON vs prose), descend first to [[agentsop-output-format-by-model]] — this skill assumes the shape is already chosen and asks only how to enforce it.

1. 何时激活 (When to activate)

Activate after you have decided the output shape (via [[agentsop-output-format-by-model]]) and the answer was "a typed/validated object", and before you write the parsing code.

Trigger Signal
LM output feeds a parser json.loads(resp) / Model.model_validate(...) is in the next line of code
You picked a typed shape format-by-model said "JSON / Pydantic / typed field" — now: who enforces it?
Repeated parse failures JSONDecodeError, ValidationError, truncated/extra-prose responses in logs
Library is already installed outlines, instructor, or guidance is in the env and you must choose between them
An enum / regex / range must hold output must be one of N labels, a valid date, a bounded int
You must decide failure stance "if the model returns garbage, do I crash, retry, or accept-and-flag?"

Anti-triggers (skip this skill):

  • The content is code / multi-step reasoning / long prose — go back to [[agentsop-output-format-by-model]]; enforcing a JSON grammar on code is the headline anti-pattern there (Aider 61%→20%). Enforcement strength is the wrong question when the shape is wrong.
  • No code consumes the output yet (one-shot exploration).
  • The shape is one token / one number — any parser works; no library needed.

Read the full file on GitHub · 386 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 386 lines · 105 tokens per session scan A dc3c3913fd51

Subscribe to this mod's changes

agentsop-structured-output-picker is a skill published in the GitHub repository agentsope/SkillAlchemy (445 stars, last pushed 14d ago), licensed MIT. It adds 105 tokens to every session and 5,428 once invoked, about $0.0004 per session on Opus 5.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-evaluation-runner

Use when evaluating prompts, LLM outputs, red-team suites, or model behavior with local eval configs and safe provider/cost controls.

yeaight7/agent-powerups · 33 tokens

prompt-perturb

Inject outside-angle prompts from creativity-technique catalogs when work is stuck in the same moves.

shimo4228/claude-harness · 23 tokens

prompt-refine

Silently restructures the user's natural-language prompt into the format the model CURRENTLY running this skill handles best, then answers. On activation it identifies which model family is executing it (Claude, GPT, Gemini, Llama, DeepSeek, Mistral, Qwen, Grok, Perplexity, Kimi, GLM, Command, Nova, or Phi) and loads…

Apeironics/prompt-refine-skill · 118 tokens

build-dotnet-agent-service

Build a local-first F# or C# Semantic Kernel agent service with explicit tools, model capability checks, evaluation fixtures, and draft-before-write promotion.

gaelic-ghost/socket · 36 tokens

prompt-decorators

Activates a structured decorator framework that modifies how Claude reasons, responds, and formats output. Trigger this skill whenever a prompt contains one or more markers prefixed with +++, such as +++Reasoning, +++StepByStep, +++Tone(style=formal), or any other +++ marker, regardless of what follows in the prompt.…

smkalami/skills · 129 tokens

vibe-creating-prompt

Judges whether a user's input suits the Vibe Creating style of video-prompt writing, and when it does, distills single-scene prompts, multi-shot descriptions, emotional imagery, or mixed input into prompts that are easier for a video model to generate from — while preserving any user-specified dialogue, voiceover…

Alisa0808/vibe-creating-skill · 187 tokens