Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here
kimi-code-agent logo

kimi-code-agent

kimi-code

developmentClaude Codeby Ragnar Rova

Summary

Run Kimi Code CLI as a Claude Code plugin subagent through the official Kimi CLI.

Install to Claude Code

/plugin install kimi-code-agent@kimi-code

Run in Claude Code. Add the marketplace first with /plugin marketplace add rrva/claude-code-kimi-agent if you haven't already.

README.md

<p align="center"> <img src="assets/banner.svg" alt="Kimi Code Agent for Claude Code" width="820"> </p>

Kimi Code Agent for Claude Code

Delegate coding tasks from Claude Code to the Kimi Code CLI — run Kimi as a plugin subagent. Ask Claude to spawn a Kimi agent to implement, review, explore, or debug, and Kimi's result (plus a resume command) comes back into your session.

Built on:

  • Claude Code plugins, skills, and subagents
  • Kimi Code CLI non-interactive prompt mode: kimi -p "<task>" --output-format stream-json
  • Kimi resume flags: --continue, --session
  • An optional --verify loop so Kimi iterates to a passing check on its own

Requirements

  • Kimi Code CLI on PATH, authenticated:
  kimi --version
  kimi login
  • Claude Code with plugin support
  • Node.js ≥ 18 (the helper is a small, dependency-free Node script)

Install

This repository is a single-plugin Claude Code marketplace. Add it straight from GitHub and install the plugin — no clone needed:

claude plugin marketplace add rrva/claude-code-kimi-agent
claude plugin install kimi-code-agent@kimi-code

Develop locally

Clone it and load it for a single session without installing:

git clone https://github.com/rrva/claude-code-kimi-agent
claude --plugin-dir ./claude-code-kimi-agent

Usage

Once installed, ask Claude in natural language:

Spawn a kimi agent to review the current diff.
Use the kimi skill to implement the smallest safe fix for this failing test.

Or invoke the subagent explicitly:

Spawn the kimi-code-agent:kimi-code subagent to explore this repo and summarize its architecture.

The helper prints a session id and a resume command after each run, so you can continue where Kimi left off:

Continue the previous kimi session and add tests for the change.

How it works

Claude Code
  └─ skill: kimi   ── or ──   subagent: kimi-code-agent:kimi-code
       └─ Bash → bin/kimi-agent-run
            └─ kimi -p "<task>" --output-format stream-json
                 └─ parsed → Kimi's response + session id + resume command

The bundled bin/kimi-agent-run helper spawns Kimi in headless prompt mode, parses its streaming stream-json output, and returns a concise summary. Claude never drives Kimi interactively — it delegates a task and gets a result back.

Watch a run live

kimi -p is non-interactive, so by default you only see the final summary. Use --tee <path> to mirror Kimi's live stream-json to a file as it runs, then tail -f that file in another terminal to watch tool calls and output in real time. The summary returned to Claude Code is unchanged — the tee is a side channel for you.

# terminal A — run it (or let Claude run it)
bin/kimi-agent-run --tee /tmp/kimi.jsonl <<'KIMI_TASK'
Explore this repository and summarize its architecture.
KIMI_TASK
# terminal B — watch
tail -f /tmp/kimi.jsonl

--live is a shorthand that tees to a temp file and prints the tail -f command.

Verify and inspect runs

kimi -p is one non-interactive pass, so a task that needs iteration normally takes several nudges. Pass --verify with your project's check command and --max-iters to make Kimi loop to green on its own:

bin/kimi-agent-run --verify 'npm run typecheck && npm test' --max-iters 4 <<'KIMI_TASK'
Implement <the change>. Only commit if the verify command passes; never commit red.
KIMI_TASK

After Kimi finishes, the helper runs --verify in the working directory. If it fails and attempts remain, Kimi is re-invoked with --continue (the failing output fed back in), up to --max-iters total attempts. The helper prints PASS/FAIL and exits non-zero (2) when the check is still failing — so Claude knows the work isn't done. Use the exact command your CI runs. (--verify and --worktree are mutually exclusive: one checks the working tree, the other isolates changes in a separate worktree.)

Every run also ends with a repository state block — git status --porcelain, git diff --stat HEAD, and the latest commits (or git worktree list for a --worktree run) — so you can see what Kimi actually changed and whether it committed, instead of trusting the prose summary.

Helper reference

bin/kimi-agent-run runs Kimi's official non-interactive prompt mode. The prompt comes from stdin or --prompt.

| Option | Description | | --- | --- | | --prompt <text> | Prompt text. If omitted, stdin is used. | | --continue | Continue the most recent Kimi session for the cwd. | | --session <id> | Resume a specific Kimi session id. | | --model <model> | Kimi model alias for this invocation. | | --worktree[=<name>] | Ask Kimi to create a git worktree for a new session. | | --cwd <path> | Working directory for the Kimi process. | | --tee <path> | Mirror live stream-json to <path> (watch with tail -f). | | --live | Like --tee but to a temp file; prints the tail command. | | --verify <cmd> | Shell check run after Kimi (in --cwd). On failure, Kimi re-runs with --continue to fix it, up to --max-iters times; exit 2 if still failing. Not combinable with --worktree. | | --max-iters <n> | Max Kimi attempts when --verify is set. Default: 1 (run once, no fix loop). | | --timeout-seconds <n> | Timeout before terminating Kimi (per sub-process). Default: 1800. | | --kimi-bin <path> | Kimi executable. Default: kimi. | | --dry-run | Print the resolved Kimi command without running it. |

Smoke test (no Kimi call):

bin/kimi-agent-run --dry-run <<'KIMI_TASK'
Summarize this repository.
KIMI_TASK

Notes & limitations

  • Permissions: Kimi prompt mode runs with auto permission — every file, shell, and network action is auto-approved with no prompt. There is no higher "yolo" level in prompt mode, and this holds regardless of the parent Claude Code session's permission mode.
  • --worktree requires a Kimi CLI version that supports -w/--worktree in prompt mode.
  • The helper depends only on Node's standard library — nothing to npm install.

License

MIT

Related plugins

Browse all →