model

A command for choosing how the agent assigns different tasks to AI models, balancing response quality against token cost.

In plain words
What is it for?
It helps select quality, balanced, or economy settings, and display the current model assignments for agents such as planners, reviewers, and code writers.
Why use it?
It removes the need to change model assignments manually when switching between complex work and tasks with a limited token budget.

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/xiaobei930/cc-best/model
Clone the repo
git clone --depth 1 https://github.com/xiaobei930/cc-best
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,077 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.00014 $0.01077
Opus 5 $0.00007 $0.00539
Sonnet 5 $0.00003 $0.00215
Haiku 4.5 $0.00001 $0.00108

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

Security

Grade A, and why

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 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/model.md · 124 lines

How it starts

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

/model - Agent 模型策略切换

切换所有 Agent 的模型分配,控制 Token 成本和输出质量的平衡。

使用方式

交互式选择(推荐)

直接执行 /cc-best:model,通过交互式选择切换策略。

使用 AskUserQuestion 向用户展示三档策略:

策略 说明 适用场景
quality 所有 Agent 使用 Opus 复杂架构设计、关键项目
balanced 设计类 Opus + 执行类 Sonnet 日常开发(推荐)
economy 仅核心 Sonnet,其余 Haiku 简单任务、Token 预算有限

用户选择后,执行:

node scripts/node/model-strategy.js <strategy>

Plugin 模式路径: 需要从 agent 文件所在目录推断插件根目录。脚本内部通过 __dirname 自动解析,无需手动指定路径。

查看当前策略

/cc-best:model --show

执行 node scripts/node/model-strategy.js --show,输出当前各 Agent 的模型配置和推断的策略名称。


策略映射表

Agent quality balanced economy
architect opus opus sonnet
code-reviewer opus opus sonnet
security-reviewer opus opus sonnet
planner opus sonnet sonnet
code-simplifier opus sonnet haiku
tdd-guide opus sonnet sonnet
requirement-validator opus sonnet haiku
build-error-resolver opus sonnet haiku

输出格式

切换成功

🔧 模型策略已切换: balanced

| Agent                 | Model  |
| --------------------- | ------ |
| architect             | opus   |
| code-reviewer         | opus   |
| security-reviewer     | opus   |
| planner               | sonnet |
| code-simplifier       | sonnet |
| tdd-guide             | sonnet |
| requirement-validator | sonnet |
| build-error-resolver  | sonnet |

已切换到 balanced 策略(5 个文件变更)

查看当前

📊 当前 Agent 模型配置

| Agent                 | Model  |
| --------------------- | ------ |
| architect             | opus   |
| ...                   | ...    |

当前策略: custom

模型别名现状(2026-06,Claude Code v2.1.173)

Read the full file on GitHub · 124 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. 2d ago First seen · 124 lines · 14 tokens per session scan A fa20a65144e5

Subscribe to this mod's changes

model is a command published in the GitHub repository xiaobei930/cc-best (50 stars, last pushed 2mo ago), licensed MIT. It adds 14 tokens to every session and 1,077 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-08-30.