Borrowing it
Nothing to install: this file belongs to KimYx0207/Claudecode-Codex-Gemini. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/KimYx0207/Claudecode-Codex-Gemini/main/.claude/commands/kim-api.mdgit clone --depth 1 https://github.com/KimYx0207/Claudecode-Codex-GeminiWrote 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.
[](https://agentmods.dev/commands/kimyx0207/claudecode-codex-gemini/kim-api)<a href="https://agentmods.dev/commands/kimyx0207/claudecode-codex-gemini/kim-api"><img src="https://agentmods.dev/badge/commands/kimyx0207/claudecode-codex-gemini/kim-api/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.
<a href="https://agentmods.dev/commands/kimyx0207/claudecode-codex-gemini/kim-api"><img src="https://agentmods.dev/badge/commands/kimyx0207/claudecode-codex-gemini/kim-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00024 | $0.01018 |
| Opus 5.5 | $0.00010 | $0.00407 |
| Sonnet 5.5 | $0.00005 | $0.00204 |
| Haiku 4.5 | $0.00002 | $0.00102 |
Grade A, and why
kim-api 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 25d 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.
This is a copy
91% identical to kim-api — 9 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.
How it starts
The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Kim API生成命令
输入接口需求,生成完整API端点:路由、参数校验、错误处理、文档注释
你现在要生成API端点:$ARGUMENTS
模式说明:专门生成单个API端点,比CRUD更灵活,适合非标准接口。
执行流程
阶段1:分析接口需求
解析用户输入,提取:
- 接口名称:如
sendVerificationCode、resetPassword - HTTP方法:GET/POST/PUT/DELETE
- 请求参数:Query/Body/Path参数
- 响应格式:返回数据结构
- 业务逻辑:核心处理逻辑
如果信息不完整,询问用户:
📝 请补充接口信息:
1. 接口名称:发送验证码
2. HTTP方法:POST(推荐)
3. 请求参数:
- email: string, 必填, 邮箱格式
- type: string, 可选, 验证码类型(register/reset)
4. 响应格式:
- success: boolean
- message: string
- expire_in: number (秒)
请确认或修改:
阶段2:检测项目结构
使用Glob检测项目现有的API结构:
# 查找现有路由文件
ls src/routers/ src/routes/ src/api/ routes/ 2>/dev/null
# 查找现有的Schema/Validator
ls src/schemas/ src/validators/ 2>/dev/null
遵循现有项目结构和命名规范。
阶段3:调用Codex生成代码
使用MCP工具调用Codex生成完整API:
生成内容:
1. 路由定义(含路径、方法、描述)
2. 请求参数Schema(含校验规则)
3. 响应模型Schema
4. Service层业务逻辑
5. 错误处理
6. API文档注释(OpenAPI格式)
阶段4:输出结果
# API生成结果:{接口名称}
## 接口信息
| 属性 | 值 |
|------|-----|
| 路径 | POST /api/verification/send |
| 描述 | 发送验证码到指定邮箱 |
| 认证 | 不需要 |
| 限流 | 60秒/次 |
## 请求参数
```json
{
"email": "[email protected]", // 必填,邮箱格式
"type": "register" // 可选,默认register
}
响应格式
成功 (200)
{
"data": {
"success": true,
"message": "验证码已发送",
"expire_in": 300
},
"error": null
}
失败 (400/429)
{
"data": null,
"error": {
"code": "RATE_LIMITED",
"message": "请求过于频繁,请60秒后重试"
}
}
生成的代码文件
[代码内容...]
---
## 使用示例
```bash
# 基础用法
/kim-api "发送验证码接口,参数email和type"
# 详细描述
/kim-api "用户头像上传接口,POST方法,接收multipart/form-data,限制5MB,返回图片URL"
# 复杂逻辑
/kim-api "订单支付回调接口,验证签名,更新订单状态,发送通知"
支持的接口类型
| 类型 | 示例 | 特点 |
|---|---|---|
| 查询接口 | 搜索、筛选、统计 | GET + Query参数 |
| 操作接口 | 发送、提交、触发 | POST + Body参数 |
| 上传接口 | 文件上传 | multipart/form-data |
| 回调接口 | 支付、Webhook | 签名验证 |
| 聚合接口 | 仪表盘数据 | 多数据源整合 |
适用场景
✅ 适合使用 /kim-api:
- 非标准的业务接口
- 需要复杂参数校验
- 第三方集成接口
- 单个功能端点
❌ 不适合:
- 标准CRUD →
/kim-crud - 大量相关接口 →
/kim-code - 复杂系统 →
/kim-team
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.
- 25d ago Changed 502fded81d37
- 1mo ago First seen · 165 lines · 24 tokens per session scan A d5f005084c9b
kim-api is a command published in the GitHub repository KimYx0207/Claudecode-Codex-Gemini (119 stars, last pushed 12d ago), licensed MIT. It adds 24 tokens to every session and 1,018 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 91% identical to kim-api, differing in 9 lines, and is treated as a copy.
Other commands, from other repositories
fastapi
FastAPI application design and implementation conventions. Use this skill when building, updating, or reviewing FastAPI services, routers, dependencies, request/response schemas, streaming endpoints, or API tests. Trigger on FastAPI-specific work such as path operation design, dependency injection, response models…
scaffold-spring-api
Scaffold a new Spring Boot 3.5.x WebFlux REST API project with standard structure, build config, and sample endpoint.
skill-go-gin-api
Padrões DARE para APIs REST em Go + Gin (ou stdlib net/http) + sqlc + PostgreSQL. Handlers, services, repositories, middleware, validador, JWT, rate limit, swag OpenAPI.
docs
Fetch Rust API documentation from docs.rs.
kafka-development-practices
Applies general coding standards and best practices for Kafka development with Scala.
laravel
Laravel development with Eloquent, Blade, Livewire, queues, and Pest testing.