Kimi Guard banner
shidesheng0218 shidesheng0218

Kimi Guard

Development community

Description

Runtime behavior guard for Kimi Code CLI — loop detection, quota gates, checkpoint/resume, supervised Wire runs

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

🛡️ agent-guard (formerly kimi-guard)

**A runtime behavior guard for coding agents — [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code), [Claude Code](https://code.claude.com) and [Codex CLI](https://github.com/openai/codex) — stop runaway agent loops before they burn your quota.**

`npm i -g @shidesheng0218/agentguard && agentguard install` → done. (Existing users: your installed `kimi-guard` keeps working — its `kguard` bin and hook entries stay live.)

[![npm](https://img.shields.io/npm/v/@shidesheng0218/agentguard?style=flat-square)](https://www.npmjs.com/package/@shidesheng0218/agentguard) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE) [![CI](https://img.shields.io/github/actions/workflow/status/shidesheng0218/kimi-guard/ci.yml?style=flat-square&label=CI)](/.github/workflows/ci.yml)

agent-guard banner

**[English](README.md) · [中文文档](docs/README.zh-CN.md)**

![agent-guard demo](https://raw.githubusercontent.com/shidesheng0218/kimi-guard/main/assets/demo.gif?v=1.3.0)

*Real terminal session: install → verify → a supervised run where the circuit breaker catches a looping tool call → live status & budget panels. Recorded with [vhs](https://github.com/charmbracelet/vhs) from actual commands ([demo.tape](assets/demo.tape)).*


Why

Kimi Code CLI is a great open-source coding agent, but its subagent system has known reliability gaps (see issues [#2142](https://github.com/MoonshotAI/kimi-cli/issues/2142), [#2368](https://github.com/MoonshotAI/kimi-cli/issues/2368), [#2578](https://github.com/MoonshotAI/kimi-cli/issues/2578)):

  • The model repeats the exact same tool call dozens of times (76×, 112× observed in the wild), silently burning tokens — fatal for headless/CI runs where nobody presses Ctrl+C.
  • All subagents share *one API key