models

A command that reports which model level each spec-flow agent uses in a project. It shows whether the choice comes from the agent, a project setting, or an environment variable.

In plain words
What is it for?
Use it to check model routing, set one agent’s model level, or remove an override so that agent uses its default.
Why use it?
Model selection can be controlled in several places, so inspecting one file can give the wrong answer. This command combines those sources into one report.

Command

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.

agentmods
npx agentmods add commands/ignaciomarin402/spec-flow-plugin/models
Clone the repo
git clone --depth 1 https://github.com/IgnacioMarin402/spec-flow-plugin
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 626 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00031 $0.00626
Opus 5 $0.00015 $0.00313
Sonnet 5 $0.00006 $0.00125
Haiku 4.5 $0.00003 $0.00063

Measured 2d ago against content hash 5e960e48dc50, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

models 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 2d 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.

commands/models.md · 51 lines

What it actually says

Run:

node ${CLAUDE_PLUGIN_ROOT}/scripts/model-routing.mjs

Show its output to the human as it came out. Do not re-derive any of it. The whole point of that script is that three layers decide an agent's model and no single file shows more than one of them — the tier its frontmatter ships, the project's override in .claude/spec-flow.config.json, and what ANTHROPIC_DEFAULT_<TIER>_MODEL pins that tier to. Reading one and concluding is how you get a confident wrong answer, which is the thing the report exists to prevent. If it exits non-zero the routing block is unusable and every spec-flow spawn is being denied; relay what it says and stop.

With arguments

$ARGUMENTS is empty for the report above. Otherwise it is <agent> <tier> or <agent> default, and you edit .claude/spec-flow.config.json in the consuming repo:

  • <agent> <tier> — set agents.<agent> to that tier. Create the file, or the agents object, if either is missing; leave every other key alone, max_opus_calls included.
  • <agent> default — delete that agent's entry, falling back to what the plugin ships. Delete the agents object too if it ends up empty, rather than leaving {} behind.

Then run the script again and show the new report. That second run is the confirmation — it reads the file back through the same code the spawn hook uses, so "I wrote it" and "it applies" are the same statement rather than two.

Expect the edit to ask the human for approval: .claude/ is a protected directory, and a write there prompts even when file edits are otherwise accepted. That is the harness, not a misconfiguration — say so rather than looking for a way around it, and never reach for a permission bypass to land a preference. In a non-interactive session where no one can approve, report the exact change you would have made and stop.

Do not guess an agent name or a tier. The report lists every valid agent, and a tier is one of opus, sonnet, haiku, fable. A model id is never valid here — a spawn accepts only a tier, and pinning a concrete version is Claude Code's own ANTHROPIC_DEFAULT_<TIER>_MODEL setting, per session rather than per agent. If the human asks for a version, say that and offer the settings entry instead of writing something this contract will refuse.

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. 2d ago First seen · 51 lines · 31 tokens per session scan A 5e960e48dc50

Subscribe to this mod's changes

models is a command published in the GitHub repository IgnacioMarin402/spec-flow-plugin (2 stars, last pushed 2d ago), licensed MIT. It adds 31 tokens to every session and 626 once invoked, about $0.0002 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-31.