kimi-setup

kimi-setup is a command for Claude Code from XinyuQu/llm-review. It costs 25 tokens per session (809 once invoked), scanned C, a copy of gemini-setup, Apache-2.0.

A guided setup tool for connecting Kimi, an AI service, through its command-line program or an API key. It checks the current setup and offers the appropriate connection path.

In plain words
What is it for?
Use it to set up Kimi reviews, install the Kimi command-line program when needed, choose a subscription or API-key connection, and verify that the setup is ready.
Why use it?
It removes the need to work out whether the Kimi command-line program is installed, whether a key is available, or which login method to use.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the llm-review plugin — 1 skill, 16 commands shipped together

Good fit Use it to set up Kimi reviews, install the Kimi command-line program when needed, choose a subscription or API-key connection, and verify that the setup is ready.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add XinyuQu/llm-review
Claude Code
/plugin install llm-review

Made for: Claude Code.

Or install llm-review, the plugin that ships this one along with the rest of its 1 skill, 16 commands.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/xinyuqu/llm-review/kimi-setup.svg)](https://agentmods.dev/commands/xinyuqu/llm-review/kimi-setup)
Your own site
<a href="https://agentmods.dev/commands/xinyuqu/llm-review/kimi-setup"><img src="https://agentmods.dev/badge/commands/xinyuqu/llm-review/kimi-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 809 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 3 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 97% copy Near-identical to another mod 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.00025 $0.00809
Opus 5 $0.00013 $0.00404
Sonnet 5 $0.00005 $0.00162
Haiku 4.5 $0.00003 $0.00081

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

Security

Grade C, and why

kimi-setup scanned grade C with 3 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 8d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Advanced — the **user** runs this in their own terminal (never you): `printf %s 'THE_KEY' | node "${CLAUDE_PLUGIN_ROOT}/scripts/llm-review.mjs" config-set --provider kimi --transport api --api-key-stdin` (key via stdin

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

**Security — hard rule:** never run any command containing the literal key yourself; a crafted key can inject shell commands. If the user pasted a key into the chat, do NOT put it in a command — tell them it is now expos

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

allowed-tools: Bash(node:*), Bash(npm:*), Bash(curl:*), Bash(bash:*), Bash(sh:*), Bash(brew:*), AskUserQuestion
Origin

This is a copy

97% identical to gemini-setup — 14 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.

commands/kimi-setup.md · 42 lines

What it actually says

Guided setup for the kimi provider. Follow this exactly; do not improvise extra steps.

Step 1 — probe status:

node "${CLAUDE_PLUGIN_ROOT}/scripts/llm-review.mjs" setup --provider kimi --json

Parse the JSON: mode, cli (command, installed, installCmd, login), api (hasKey, primaryEnv, keyHelp), ready, resolvedTransport, reviewCommand.

Step 2 — if already ready: tell the user it's set up via resolvedTransport, then AskUserQuestion once: Keep current setup vs Reconfigure. If keep → show status and stop.

Step 3 — choose a path by mode:

  • api-only → API KEY FLOW.
  • cli-only → SUBSCRIPTION FLOW.
  • bothAskUserQuestion exactly once: "How do you want to connect to Kimi?" with options, first one suffixed (Recommended):
    • Subscription via the {cli.command} CLI (Recommended) — reuses your existing login, usually cheaper for heavy use
    • API key — pay-per-token HTTP API

SUBSCRIPTION FLOW:

  1. If cli.installed is false and cli.installCmd is set: AskUserQuestion once — Install {cli.command} now (Recommended) vs Skip for now. If install, run cli.installCmd via Bash, then re-run the Step 1 probe. If skip, present status and stop.
  2. Persist the choice: node "${CLAUDE_PLUGIN_ROOT}/scripts/llm-review.mjs" config-set --provider kimi --transport cli
  3. Re-run the Step 1 probe. If cli.login indicates a login is still required (it is not the "already authenticated" note), tell the user to authenticate themselves in this session by typing: !{cli.login} — this is an interactive browser/login you cannot perform for them.
  4. Present the final probe output.

API KEY FLOW:

  1. Tell the user where to get a key: api.keyHelp.

  2. Offer how to provide it, most secure first:

    • Recommended: run /plugin, open llm-review config, paste the key into the secure prompt (stored in the OS keychain).
    • Or export api.primaryEnv in their shell for this session.
    • Advanced — the user runs this in their own terminal (never you): printf %s 'THE_KEY' | node "${CLAUDE_PLUGIN_ROOT}/scripts/llm-review.mjs" config-set --provider kimi --transport api --api-key-stdin (key via stdin, never in argv; writes ~/.config/llm-review/config.json, chmod 600).

    Security — hard rule: never run any command containing the literal key yourself; a crafted key can inject shell commands. If the user pasted a key into the chat, do NOT put it in a command — tell them it is now exposed, to add it via the keychain (/plugin) or their own shell env, and to rotate it.

  3. Re-run the Step 1 probe and present it.

Step 4 — finish: state whether the provider is now ready and show the exact review command (reviewCommand, e.g. /llm-review:kimi). Use AskUserQuestion at most twice total in this whole flow.

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. 8d ago First seen · 42 lines · 25 tokens per session scan C 8e450ed59f2d

Subscribe to this mod's changes

kimi-setup is a command published in the GitHub repository XinyuQu/llm-review (6 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 25 tokens to every session and 809 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 3 findings (asks for root, unrestricted tool access, makes network calls). It is 97% identical to gemini-setup, differing in 14 lines, and is treated as a copy.