Claudecode-Codex-Gemini: Command for Claude Code

.claude/commands/kim-crud.md

kim-crud is a command for Claude Code from KimYx0207/Claudecode-Codex-Gemini. It costs 18 tokens per session (1,180 once invoked), scanned A, original, MIT.

A command that generates the code needed for database CRUD operations—creating, reading, updating, and deleting records—from a table name and its fields. It supports templates for FastAPI, Express, and Spring projects, producing models, validation schemas, routes, and services.

In plain words
What is it for?
Use it to define a resource's fields, detect the project's web framework, and generate its database model, input validation, API routes, and business-logic service.
Why use it?
It removes repetitive setup when adding a database-backed resource and asks for missing table or field details before generating code.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Codex.

This is KimYx0207/Claudecode-Codex-Gemini's own configuration. It tells Claude Code how to work on Claudecode-Codex-Gemini 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 Claudecode-Codex-Gemini configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/KimYx0207/Claudecode-Codex-Gemini/main/.claude/commands/kim-crud.md
Clone the repo
git clone --depth 1 https://github.com/KimYx0207/Claudecode-Codex-Gemini

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-crud

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/kimyx0207/claudecode-codex-gemini/kim-crud"><img src="https://agentmods.dev/badge/commands/kimyx0207/claudecode-codex-gemini/kim-crud.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 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,180 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.00018 $0.01180
Opus 5 $0.00009 $0.00590
Sonnet 5 $0.00004 $0.00236
Haiku 4.5 $0.00002 $0.00118

Measured 10d ago against content hash 8fe77fd5a0af, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

kim-crud 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 10d 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.

.claude/commands/kim-crud.md · 173 lines

How it starts

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

Kim CRUD生成命令

输入表名和字段,生成完整的增删改查代码(Model + Schema + Router + Service)

你现在要生成CRUD代码:$ARGUMENTS

模式说明:这是模板化生成模式,专门处理数据库CRUD操作。

执行流程

阶段1:信息收集

首先分析用户输入,提取:

  • 表名:如 UserProductOrder
  • 字段列表:字段名、类型、约束
  • 技术栈:FastAPI/Express/Spring(检测项目现有框架)

如果信息不完整,询问用户:

📝 请补充以下信息:

1. 表名:User(已识别)
2. 字段(格式:字段名:类型:约束):
   - id: int: 主键,自增
   - username: str: 唯一,必填
   - email: str: 唯一,必填
   - password: str: 必填
   - created_at: datetime: 默认当前时间

请确认或补充字段:

阶段2:检测项目技术栈

使用Glob和Read检测项目使用的框架:

# 检测FastAPI
ls pyproject.toml requirements.txt 2>/dev/null | xargs grep -l "fastapi"

# 检测Express
ls package.json 2>/dev/null | xargs grep -l "express"

# 检测Spring
ls pom.xml build.gradle 2>/dev/null

阶段3:调用Codex生成代码

使用MCP工具调用Codex,根据检测到的框架生成代码。

FastAPI模板(Python):

生成以下文件:
1. models/{table_name}.py - SQLAlchemy ORM模型
2. schemas/{table_name}.py - Pydantic验证模型
3. routers/{table_name}.py - FastAPI路由(5个端点)
4. services/{table_name}.py - 业务逻辑层

Express模板(Node.js):

生成以下文件:
1. models/{table_name}.js - Sequelize/Prisma模型
2. validators/{table_name}.js - Joi/Zod验证
3. routes/{table_name}.js - Express路由
4. services/{table_name}.js - 业务逻辑

阶段4:生成并保存代码

初始化工作目录并保存生成的代码:

mkdir -p .kim-orchestrator && echo "" > .kim-orchestrator/crud_result.md

将生成的代码保存到 .kim-orchestrator/crud_result.md,同时在项目中创建实际文件。


生成的API端点

方法 端点 描述
POST /api/{table}s 创建记录
GET /api/{table}s 获取列表(分页)
GET /api/{table}s/{id} 获取单条记录
PUT /api/{table}s/{id} 更新记录
DELETE /api/{table}s/{id} 删除记录

使用示例

# 基础用法
/kim-crud "User表:id, username, email, password, created_at"

# 详细描述
/kim-crud "创建Product表,字段:id主键、name名称、price价格decimal、stock库存int、category分类"

# 指定框架
/kim-crud "用FastAPI生成Order表的CRUD,字段:订单号、用户ID、金额、状态"

生成代码示例(FastAPI)

models/user.py

from sqlalchemy import Column, Integer, String, DateTime
from sqlalchemy.sql import func
from core.database import Base

class User(Base):
    __tablename__ = "users"

    id = Column(Integer, primary_key=True, index=True)
    username = Column(String(50), unique=True, nullable=False)
    email = Column(String(100), unique=True, nullable=False)
    password = Column(String(255), nullable=False)
    created_at = Column(DateTime, server_default=func.now())

Read the full file on GitHub · 173 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. 10d ago First seen · 173 lines · 18 tokens per session scan A 8fe77fd5a0af

Subscribe to this mod's changes

kim-crud is a command published in the GitHub repository KimYx0207/Claudecode-Codex-Gemini (120 stars, last pushed 28d ago), licensed MIT. It adds 18 tokens to every session and 1,180 once invoked, about $0.0001 per session on Opus 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.