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.
npx skills add agentsope/SkillAlchemy --skill agentsop-output-format-by-modelgit clone --depth 1 https://github.com/agentsope/SkillAlchemyWrote 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/skills/agentsope/skillalchemy/agentsop-output-format-by-model)<a href="https://agentmods.dev/skills/agentsope/skillalchemy/agentsop-output-format-by-model"><img src="https://agentmods.dev/badge/skills/agentsope/skillalchemy/agentsop-output-format-by-model.svg" alt="Measured on agentmods" 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.00111 | $0.06806 |
| Opus 5 | $0.00056 | $0.03403 |
| Sonnet 5 | $0.00022 | $0.01361 |
| Haiku 4.5 | $0.00011 | $0.00681 |
Grade A, and why
agentsop-output-format-by-model 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 — 400 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Output-Format-by-Model — 让格式服务于任务,而不是反过来
One-liner: Different output formats carry different cognitive load for the model. Code-in-JSON is the canonical proof: the same model writes worse code when wrapped in a JSON tool-call than when emitted as plain text + diff. The reverse failure (asking for prose when you need a typed object) is just as common. Pick format per (task × consumer), not by reflex.
1. 何时激活 (When to activate)
Activate this skill before committing to an output schema in any of these situations:
| Trigger | Signal |
|---|---|
| Designing a coder-agent | "should the model return a apply_patch tool call or plain-text diff?" |
| Adding a tool to an existing agent | "tool input has a code / query / sql / regex field — should I nest it in JSON or leave it as a string?" |
| Building extraction / classification | "should I use dspy.Predict typed fields, Pydantic + response_format=json_schema, or just markdown?" |
| Wiring an evaluator | "the metric needs a number — but the model also has to reason to produce it" |
| Migrating a working prompt to "structured outputs" | someone said "let's make it safer with JSON schema" |
| Tool-call harness adds latency / errors | repeated json.JSONDecodeError, escaping bugs, truncated outputs |
Anti-triggers (skip this skill):
- The format is fixed by an external API (e.g. you must return OpenAI function-call JSON — no choice).
- One-shot exploratory prompting where no consumer parses the output yet.
- The task is itself about JSON (e.g. "fix this malformed JSON") — see §6.
2. 核心心智模型 (Core mental model)
2.1 Three-layer claim
┌──────────────────────────────────────────────────┐
│ FORMAT FOLLOWS FUNCTION │
│ │
│ Some formats add cognitive load to the model │
│ and measurably degrade quality on the │
│ *content* the format is supposed to wrap. │
└──────────────────────────────────────────────────┘
▲ ▲
│ │
What's being consumed? Who consumes it?
(code? prose? entities? (human reader? parser?
number? action selection?) downstream LM? compiler?)
│ │
└──────────┬───────────────┘
▼
FORMAT SELECTION
(text+diff | markdown | JSON | tool_use
| grammar-constrained | typed field)
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 · 400 lines · 111 tokens per session scan A 4d3898f2e04d
agentsop-output-format-by-model is a skill published in the GitHub repository agentsope/SkillAlchemy (366 stars, last pushed 5d ago), licensed MIT. It adds 111 tokens to every session and 6,806 once invoked, about $0.0006 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.
Other skills, from other repositories
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…
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.
prompt-evaluation-runner
Use when evaluating prompts, LLM outputs, red-team suites, or model behavior with local eval configs and safe provider/cost controls.
prompt-perturb
An idea-generation tool that fetches creative prompts from outside sources after removing project-specific context from the search.
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.…
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…