kim-code

kim-code is a command for Claude Code from KimYx0207/Kim_Service. It costs 25 tokens per session (1,318 once invoked), scanned A, original, MIT.

A development command that uses one AI tool to analyse requirements and another to generate code, with a fast path that skips code review.

In plain words
What is it for?
It helps prototype features, analyse requirements, inspect the project, generate implementation files, and coordinate Codex with Claude.
Why use it?
It gives a defined workflow for turning a development request into code while checking the project setup and requiring approval before changing files.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Codex.

Good fit It helps prototype features, analyse requirements, inspect the project, generate implementation files, and coordinate Codex with Claude.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kimyx0207/kim_service/kim-code
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.

Clone the repo
git clone --depth 1 https://github.com/KimYx0207/Kim_Service

Made for: Claude Code.

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 kim-code

README.md
[![agentmods](https://agentmods.dev/badge/commands/kimyx0207/kim_service/kim-code/github.svg)](https://agentmods.dev/commands/kimyx0207/kim_service/kim-code)
Your own site
<a href="https://agentmods.dev/commands/kimyx0207/kim_service/kim-code"><img src="https://agentmods.dev/badge/commands/kimyx0207/kim_service/kim-code/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 kim-code

Your own site · 80×15
<a href="https://agentmods.dev/commands/kimyx0207/kim_service/kim-code"><img src="https://agentmods.dev/badge/commands/kimyx0207/kim_service/kim-code.svg" alt="Reviewed on agentmods" width="80" 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 1,318 The whole file, excluding the scripts and references it only reads on demand.
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.00025 $0.01318
Opus 5.5 $0.00010 $0.00527
Sonnet 5.5 $0.00005 $0.00264
Haiku 4.5 $0.00003 $0.00132

Measured 1mo ago against content hash 3f4c2ba0d2bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kim-code 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 1mo 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.

tools/claudecode-codex-gemini/host/claude/commands/kim-code.md · 158 lines

How it starts

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

Kim Service 执行门(必须先执行)

  1. 先复述原始用户意图,并列出本次计划调用的 MCP 工具、目标目录和拟新增或修改的文件;不要把本命令扩展成 Router 或自动验收流程。
  2. 任何项目写入、依赖安装、外部访问或环境变更都必须先获得对应的人类批准。未批准时只分析并展示计划。
  3. 写入前读取现有目标;目标已存在时不得用重定向、空文件或整文件覆盖。只做受管更新,遇到冲突停止并展示差异。
  4. 新文件只能在已批准的项目根目录内安全创建;不得写用户级配置。MCP 仅使用本 Tool 的 cli.mjs mcp codex 或 cli.mjs mcp gemini 运行时及其已注册工具。

Kim代码生成命令(Claude + Codex)

快速开发模式:需求分析 → 代码生成,跳过审查环节

你现在要协调2个AI工具完成任务:$ARGUMENTS

模式说明:这是精简版的双引擎模式,适合快速开发、原型验证,不需要代码审查。

⚠️ 文件写入规则(必须遵守)

先展示 .kim-orchestrator/ 内的目标文件清单并获得项目写入批准。逐个读取已有目标;已有文件只做受管更新,新文件使用安全创建,禁止通过重定向预创建或清空文件。

执行流程

阶段0.1:健康检查

参考 .claude/skills/kim-orchestrator/prompts/health-check.md 执行MCP健康检查。

在开始前检测 mcp__codex__codex 工具是否可用:

  • ✅ 可用 → 继续执行
  • ❌ 不可用 → 显示修复指南,询问是否用Claude降级执行

阶段0.2:初始化工作目录

在获得批准后,安全创建 .kim-orchestrator/ 目录;逐个检查三个目标文件,存在则读取,不存在才创建。不要覆盖已有内容。

然后读取这些文件:

  • Read .kim-orchestrator/phase1_requirements.json
  • Read .kim-orchestrator/phase2_code.md
  • Read .kim-orchestrator/result.md

阶段1:需求分析(你自己完成)

详细分析用户需求,输出JSON格式的技术方案:

{
  "task_description": "任务描述",
  "features": ["功能1", "功能2"],
  "tech_stack": {
    "language": "编程语言",
    "framework": "框架",
    "libraries": ["依赖库"]
  },
  "file_structure": {
    "files": [{"path": "路径", "purpose": "用途"}]
  },
  "key_points": ["关键实现要点"],
  "risks": ["潜在风险"]
}

保存到 .kim-orchestrator/phase1_requirements.json

阶段2:代码生成(调用Codex MCP Server)

检查工具:确认 mcp__codex__codex 可用。如果不可用,提示用户配置MCP Server。

调用Codex生成代码:

  • prompt: 根据phase1_requirements.json生成完整代码
  • cwd: 当前已批准的项目根目录
  • sandbox: 只有用户批准项目写入时才使用 workspace-write,否则 read-only

将响应保存到 .kim-orchestrator/phase2_code.md

阶段3:生成最终报告

# Kim双引擎开发结果(Claude + Codex)

**任务描述**: $ARGUMENTS
**完成时间**: [当前时间]
**模式**: 快速开发(无审查)

---

## 阶段1: 需求分析(Claude Sonnet 4.5)

\`\`\`json
[phase1_requirements.json的内容]
\`\`\`

---

## 阶段2: 代码生成(GPT-5.1 Codex Max)

[phase2_code.md的内容]

---

## 总结

本次编排完成以下工作:
1. ✅ Claude完成需求分析和技术方案设计
2. ✅ Codex生成完整的可执行代码
3. ⏭️ 跳过代码审查(快速开发模式)

💡 **提示**:如需代码审查,请使用 `/kim-team` 命令(完整三引擎模式)

Read the full file on GitHub · 158 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. 1mo ago First seen · 158 lines · 25 tokens per session scan A 3f4c2ba0d2bc

Subscribe to this mod's changes

kim-code is a command published in the GitHub repository KimYx0207/Kim_Service (177 stars, last pushed 5d ago), licensed MIT. It adds 25 tokens to every session and 1,318 once invoked, about $0.0001 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-09-14.