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.
git clone --depth 1 https://github.com/sigistry/marketplaceWrote 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.
[](https://agentmods.dev/commands/sigistry/marketplace/structured-output-doctor)<a href="https://agentmods.dev/commands/sigistry/marketplace/structured-output-doctor"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/structured-output-doctor/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.
<a href="https://agentmods.dev/commands/sigistry/marketplace/structured-output-doctor"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/structured-output-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00023 | $0.00837 |
| Opus 5 | $0.00012 | $0.00418 |
| Sonnet 5 | $0.00005 | $0.00167 |
| Haiku 4.5 | $0.00002 | $0.00084 |
Grade A, and why
structured-output-doctor 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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 39 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Find every LLM call at $ARGUMENTS (default: the LLM call sites in the current diff, or src//app//lib/) whose response is parsed as JSON, and harden it. Plain "JSON mode" or prompt-and-pray produces invalid JSON on a meaningful fraction of calls; provider-native structured output drops that failure rate by one to two orders of magnitude. This command applies the structured-output skill: switch to native schema-constrained output where the provider supports it, add a validated parse, and wrap it in a retry-with-error-feedback loop.
Process
Step 1: Detect provider and locate fragile parses
Identify the SDK (Anthropic, OpenAI, Gemini/Vertex, LangChain, Vercel AI SDK, Pydantic AI), then grep the call sites for the fragile shapes:
| Smell | Pattern |
|---|---|
| Blind parse | JSON.parse(, json.loads(, json.loads(resp...) right after a completion |
| Regex extraction | re.search(r"\{.*\}", /json/, .split("```"), "strip the markdown fence" |
| Prompt-only JSON | "Respond ONLY with JSON", "return valid JSON" with no schema enforcement |
| Unvalidated dict access | data["field"] with no schema/model between the parse and the use |
| Bare JSON mode | response_format={"type": "json_object"} / json mode with no schema |
Step 2: Choose the strongest available mechanism (apply the structured-output skill)
Per references/structured-output-apis.md, pick the best option the provider offers:
- Schema-constrained output: Anthropic
output_config.format(json_schema) or strict tool use (strict: true); OpenAIresponse_format: json_schemawithstrict: true; GeminiresponseSchema; Vercel AI SDKgenerateObject; Pydantic AIresult_type. These guarantee schema-valid output. - Tool/function schema: when the value is really a function argument, route it through a strict tool schema instead of free-text JSON.
- Fallback: if the provider/model lacks native support, keep JSON mode but add strict validation + retry (below).
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.
- 7d ago First seen · 39 lines · 23 tokens per session scan A 390f3085e1a5
structured-output-doctor is a command published in the GitHub repository sigistry/marketplace (3 stars, last pushed today), licensed MIT. It adds 23 tokens to every session and 837 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-09-03.
Other commands, from other repositories
prompt-generator
Generate effective prompts for Claude 4.5 Sonnet to achieve user-defined outcomes.
prompt-review
Scan prompts for ground rule, KISS/DRY, AI sweep, and context budget violations.
prompt-optimize
Apply fixes for issues found by prompt-review.
prompt-create
Create a new prompt following ground rules.
prompt-history
Manage history of created and optimized prompts.
debug
Structured debugging with parallel investigation agents.