kimi-plugin-cc: Instructions file for Claude Code

AGENTS.md

kimi-plugin-cc AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from linxule/kimi-plugin-cc. It costs 7,164 tokens per session, scanned A, original, Apache-2.0.

A set of project instructions for coding agents working on the linxule/kimi-plugin-cc codebase.

In plain words
What is it for?
It is for guiding code changes, checks, and troubleshooting in that specific repository.
Why use it?
It gives an agent the repository’s layout, commands, architecture, and rules for avoiding regressions in its hook installation code.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: ${CLAUDE_PLUGIN_ROOT} variable, but also the file is AGENTS.md. Also seen: mentions .claude-plugin; mentions CLAUDE.md; mentions subagents.

This is linxule/kimi-plugin-cc's own configuration. It tells Claude Code, Codex and OpenCode how to work on kimi-plugin-cc itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kimi-plugin-cc configures →

Runs only inside a plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else, and the catalogue could not identify which plugin ships it.

Reuse

Borrowing it

Nothing to install: this file belongs to linxule/kimi-plugin-cc. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/linxule/kimi-plugin-cc/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/linxule/kimi-plugin-cc

Made for: Claude Code, Codex, OpenCode.

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-plugin-cc AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/linxule/kimi-plugin-cc/agents-md/github.svg)](https://agentmods.dev/instructions/linxule/kimi-plugin-cc/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/linxule/kimi-plugin-cc/agents-md"><img src="https://agentmods.dev/badge/instructions/linxule/kimi-plugin-cc/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kimi-plugin-cc AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/linxule/kimi-plugin-cc/agents-md"><img src="https://agentmods.dev/badge/instructions/linxule/kimi-plugin-cc/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7,164 This file is loaded in full into every session.
When invoked 7,164 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.07164 $0.07164
Opus 5.5 $0.02866 $0.02866
Sonnet 5.5 $0.01433 $0.01433
Haiku 4.5 $0.00716 $0.00716

Measured today against content hash c5dc3d2717ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kimi-plugin-cc AGENTS.md 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 today.

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.

AGENTS.md · 152 lines

How it starts

The opening of the file, as written. The whole thing — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Project context for coding agents working in this repository. This is the contract sheet: each bullet states what must not regress, in present tense, with a pointer to the full mechanics and rationale in docs/invariants.md (§ numbers below). Keep this file under 32 KB. CLAUDE.md imports it with @AGENTS.md, so there is one source and nothing to mirror. Release history lives in CHANGELOG.md and ROADMAP-TO-GA.md § Post-GA audit log, never here.

Quick reference

  • Version: 2.4.3 (kimi-code, subprocess transport, native agent-core-v2).
  • Native-v2 safety (§1): every executed tool passes managed PreToolUse; the sole chain-breaking plan-file allow is NEVER armed. Preserve all four closures: same-child-home preflight rejects every normalized default_plan_mode spelling (before spawn and at spawn, including Stop hook; remedy the config key, not setup); deny Enter/ExitPlanMode for every label; resume requires proven native-v2 lineage and every-agent raw journal scan for plan taint; refuse tower/subagent_fork/master experimental selectors. Exact per-operation NATIVE_V2_CERTIFIED rows require source tag scan, plan-ON bypass control and operation smoke; legacy KIMI_TESTED_MINORS never gains 0.42. Require the first stream line to be the exact-version marker for v2 and refuse it on v1. Validate Bash.cwd against the trusted root before command policy. Full refusal codes, normalization rules and evidence: docs/invariants.md §1 and certification provenance §2.
  • Hook-pin durability (§1): the canonical hook command never embeds a version-stamped Node token; preferStableNodePath prefers process.argv0 only when absolute and realpath-identical; verifyHookInstalled runs access(nodeBin, X_OK) fail-closed on the token parsed back from the built command (refusal_kind:"node-bin-not-executable" is the one refusal whose remedy is NOT /kimi:setup). Re-pin-recoverable refusals carry retryable_after_setup; agents re-pin via ${CLAUDE_PLUGIN_ROOT}/scripts/companion.sh setup and retry ONCE only when it is literally true and setup exits 0. In-verifier auto-repin is REJECTED — do not re-propose.
  • Test discipline (§1): detached-worker hook-enforcement tests MUST run the companion as a real node subprocess through a symlink with NO KIMI_PLUGIN_CC_NODE_BIN override and NO KIMI_PLUGIN_CC_SKIP_HOOK_CHECK. A real-binary smoke MUST assert its own precondition when the behaviour depends on host state; never write a "plan-file write is denied under plan mode" smoke — that path is never armed, so green would be the vacuous-precondition failure.
  • Upstream compat (§2): native-v2 certification is EXACT and per-operation in runtime/kimi-engine.ts; all eight operations support 0.42.0, 0.43.0, 0.43.1, 2.0.0–2.0.2, 2.1.0–2.1.1, 2.2.0 and 2.3.0–2.3.3. Legacy-v1 ends at 0.41.x for an explicitly pinned binary. The sole plan-service allow still bypasses hooks through 2.3.3 (MoonshotAI/kimi-code#3431); retain every no-plan closure. Each audit re-verifies ALL surfaces in docs/upstream-compat-audit.md and docs/invariants.md §2, including engine/session provenance, hook ordering/schema/aggregation, Write/Edit path and Bash command+cwd, bootstrap/config/trust, plan/restore routes, print argv, goal interception/exits, child hooks, finite budgets and exported swarm concurrency. Monitor reports never certify. Exact 2.3.2/2.3.3 swarm activation/deactivation uses authenticated loopback web lifecycles around the single kimi -p -r runner; preserve model/auto/swarm profile with plan off, marker/version/session identity, memory-only token and journal proof. runSwarm owns deactivation, with remaining budget normally and one separate 2s cancellable recovery attempt; cancellation starts no fresh server. Process ownership/quiescence uncertainty prevents success and preserves diagnostics, raw output and write worktree. Root loss requires prior identity; PGID changes are not exit. Smoke must correlate distinct child journals, assigned Write/Edit paths and toolCallIds with results—not aggregate denials or coordinator-only work. Evidence: docs/native-v2-status.md.
  • Toolchain: Node >= 22.5, TypeScript, bun for development; npm CLI for registry operations, including package installation
  • Workflow: edit runtime/**/*.ts → bun run check (build + typecheck + test + drift gate)
  • Installed-state verification: For questions about what a host is actually running, resolve that host's active version-stamped install cache and run its bundled scripts/companion.sh setup --check. The checkout, package metadata, and another host's cache are not proof of active runtime state.
  • Credential-bearing config (§3): ~/.kimi-code/config.toml can hold a BYO-provider apiKey, and ~/.kimi-code/credentials/ is the real OAuth-token store (always has been — not a per-version migration). For routine checks never read, print, copy or retain either; use the sanitized setup --check or setup --models [--json] projection. Model listing internally parses config but emits only routing fields, never secrets or raw parser errors; it never reads the OAuth store or makes provider calls. An explicitly authorized diagnosis of config.toml is restricted to the managed hook block with credentials redacted; credentials/ is never read or copied.

Read the full file on GitHub · 152 lines

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. today Changed · +18 tokens per session c5dc3d2717ed
  2. yesterday Changed · +2 lines · -730 tokens per session e3f2490d9c45
  3. 2d ago Changed · +1 lines · -41 tokens per session 9ec4e67d6c62
  4. 4d ago Changed · +6 lines · +176 tokens per session d8711ff0dff9
  5. 5d ago Changed · +68 tokens per session d5371981e874
  6. 12d ago Changed · +1 lines · +443 tokens per session a758e661202a
  7. 13d ago Changed · +380 tokens per session 330a76230713
  8. 1mo ago Changed · +9 lines · +119 tokens per session 5c1700423ae1
  9. 1mo ago Changed · +64 tokens per session 16094a170cf4
  10. 1mo ago First seen · 133 lines · 6,667 tokens per session scan A 781dc5f04cd6

Subscribe to this mod's changes

kimi-plugin-cc AGENTS.md is an instructions file published in the GitHub repository linxule/kimi-plugin-cc (42 stars, last pushed yesterday), licensed Apache-2.0. It adds 7,164 tokens to every session, about $0.0287 per session on Opus 5.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-30.

Related

Other instructions, from other repositories