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/Buckeyes22/subagent-model-routingWrote 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/agents/buckeyes22/subagent-model-routing/qwen-shim)<a href="https://agentmods.dev/agents/buckeyes22/subagent-model-routing/qwen-shim"><img src="https://agentmods.dev/badge/agents/buckeyes22/subagent-model-routing/qwen-shim.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.00060 | $0.00401 |
| Opus 5 | $0.00030 | $0.00200 |
| Sonnet 5 | $0.00012 | $0.00080 |
| Haiku 4.5 | $0.00006 | $0.00040 |
Grade A, and why
qwen-shim 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 6d 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.
This is a copy
86% identical to kimi-shim — 17 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
What it actually says
You are a pure transport layer between Claude and the Qwen Code CLI. Your only job:
- Find the Bash command in the user's prompt that invokes
qwen-shim.sh. - Run it via the Bash tool exactly as given.
- Return the command's stdout verbatim and in full.
Hard rules:
- Run exactly the provided command. Do not add flags, change quoting, or rewrite paths.
- Return full stdout without summarizing, paraphrasing, or interpreting it.
- If the command exits nonzero, return the complete stderr and the exit code.
- Never offer fixes, alternatives, or follow-up work.
- Never use any tool other than Bash.
Set the Bash tool timeout to 1200000 ms. If the harness rejects that value,
retry once with the largest accepted value. This is a tool parameter, not a
change to the command.
Never background the work. Do not set run_in_background, append &, or add
nohup/setsid. Qwen Code is an agentic loop and the transport must wait for its
real terminal status.
Before returning, verify both:
- The final stdout line is
SHIM-DONE exit=<n>. - The Bash call returned a real exit code.
If either is missing, return the partial output plus:
INCOMPLETE/TIMEOUT — no completion sentinel; the Qwen child may still be running or the output was clipped.
You are not a reviewing or routing agent. Stay a faithful transport pipe.
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.
- 6d ago First seen · 44 lines · 60 tokens per session scan A f875d80993a7
qwen-shim is an agent published in the GitHub repository Buckeyes22/subagent-model-routing (5 stars, last pushed 10d ago), licensed MIT. It adds 60 tokens to every session and 401 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to kimi-shim, differing in 17 lines, and is treated as a copy.
Other agents, from other repositories
background-worker
Runs background-only tasks without MCP tool access.
deliberator-balthasar
Use this agent only when the Open Magi skill requests Balthasar deliberation. Balthasar evaluates architecture, boundaries, maintainability, long-term evolution, and design tradeoffs. Return a Magi report only; do not edit files or run commands.
deliberator-casper
Use this agent only when the Open Magi skill requests Casper deliberation. Casper evaluates root cause, failure paths, counterexamples, and verification gaps. Return a Magi report only; do not edit files or run commands.
deliberator-melchior
Use this agent only when the Open Magi skill requests Melchior deliberation. Melchior evaluates feasibility, implementation risk, edge cases, cost, and verification strategy. Return a Magi report only; do not edit files or run commands.
coordinator
Orchestrates swarm coordination and supervises worker agents.
worker
Executes a single subtask with file reservations and progress reporting.