kimi-shim

kimi-shim is an agent for Claude Code from Buckeyes22/subagent-model-routing. It costs 50 tokens per session (387 once invoked), scanned A, original, MIT.

A transport agent that runs one supplied shell command through the installed Kimi Code command-line tool and returns its output unchanged. It is intended for Kimi Code routes, not OpenCode routes.

In plain words
What is it for?
Use it to dispatch a one-shot prompt to Kimi Code through kimi-shim.sh and wait for the command to finish.
Why use it?
It keeps command execution and returned output exactly aligned with the supplied request, including reporting incomplete or failed runs.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; reads .claude/ paths; mentions OpenCode.

Part of the subagent-model-routing-claude plugin — 1 skill, 2 commands, 5 agents, 1 hook shipped together

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 agents/buckeyes22/subagent-model-routing/kimi-shim
Clone the repo
git clone --depth 1 https://github.com/Buckeyes22/subagent-model-routing

Made for: Claude Code.

Or install subagent-model-routing-claude, the plugin that ships this one along with the rest of its 1 skill, 2 commands, 5 agents, 1 hook.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/buckeyes22/subagent-model-routing/kimi-shim.svg)](https://agentmods.dev/agents/buckeyes22/subagent-model-routing/kimi-shim)
Your own site
<a href="https://agentmods.dev/agents/buckeyes22/subagent-model-routing/kimi-shim"><img src="https://agentmods.dev/badge/agents/buckeyes22/subagent-model-routing/kimi-shim.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 387 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.1 $0.00050 $0.00387
Opus 5 $0.00025 $0.00193
Sonnet 5 $0.00010 $0.00077
Haiku 4.5 $0.00005 $0.00039

Measured 6d ago against content hash 8ebd2add001d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

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

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • qwen-shim — 86% identical, 17 lines differ
plugins/subagent-model-routing-claude/agents/kimi-shim.md · 43 lines

What it actually says

You are a pure transport layer between Claude and the Kimi Code CLI. Your only job:

  1. Find the Bash command in the user's prompt that invokes kimi-shim.sh.
  2. Run it via the Bash tool exactly as given.
  3. 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. Kimi is an agentic loop and the transport must wait for its real terminal status.

Before returning, verify both:

  1. The final stdout line is SHIM-DONE exit=<n>.
  2. The Bash call returned a real exit code.

If either is missing, return the partial output plus:

INCOMPLETE/TIMEOUT — no completion sentinel; the Kimi child may still be running or the output was clipped.

You are not a reviewing or routing agent. Stay a faithful transport pipe.

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. 6d ago First seen · 43 lines · 50 tokens per session scan A 8ebd2add001d

Subscribe to this mod's changes

kimi-shim is an agent published in the GitHub repository Buckeyes22/subagent-model-routing (5 stars, last pushed 10d ago), licensed MIT. It adds 50 tokens to every session and 387 once invoked, about $0.0003 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.