agentsop-output-format-by-model

agentsop-output-format-by-model is a skill for Claude Code, Codex from agentsope/SkillAlchemy. It costs 111 tokens per session (6,806 once invoked), scanned A, original, MIT.

Guidance for choosing how a language model should return its answer, based on the task, the receiving program, and the model. It covers plain text, code changes, JSON, typed fields, and other formats.

In plain words
What is it for?
Use it when designing agent prompts, adding tools, building extraction or classification tasks, creating evaluators, or changing a prompt to use structured outputs.
Why use it?
The wrong format can make generated code worse or make structured data difficult for a program to read. It helps match the response shape to the job it must perform.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: built for aider.

Good fit Use it when designing agent prompts, adding tools, building extraction or classification tasks, creating evaluators, or changing a prompt to use structured outputs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agentsope/skillalchemy/agentsop-output-format-by-model
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-output-format-by-model
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-output-format-by-model

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentsope/skillalchemy/agentsop-output-format-by-model.svg)](https://agentmods.dev/skills/agentsope/skillalchemy/agentsop-output-format-by-model)
Your own site
<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>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,806 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.00111 $0.06806
Opus 5 $0.00056 $0.03403
Sonnet 5 $0.00022 $0.01361
Haiku 4.5 $0.00011 $0.00681

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

Security

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.

skills/agentsop-output-format-by-model/SKILL.md · 400 lines

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)

Read the full file on GitHub · 400 lines

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. 7d ago First seen · 400 lines · 111 tokens per session scan A 4d3898f2e04d

Subscribe to this mod's changes

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.

Related

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…

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-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

An idea-generation tool that fetches creative prompts from outside sources after removing project-specific context from the search.

shimo4228/claude-harness · 194 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