Agent skill

Crud

by zhe-qi in zhe-qi/clhoria-template

创建或修改 CRUD 模块。当需要创建新的增删改查 API、修改现有路由模块、添加新字段、新增接口、或用户请求"创建/修改 XX 管理"时使用

MITAuto-check passedBackend & APIs

Install Crud

skills CLI
$ npx skills add zhe-qi/clhoria-template --skill crud -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install zhe-qi/clhoria-template crud --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/zhe-qi/clhoria-template.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/crud .claude/skills/crud && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
crud
GitHub stars
193
Token cost
~552 tokens
SKILL.md length
71 words
Files
5
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

创建或修改 CRUD 模块。当需要创建新的增删改查 API、修改现有路由模块、添加新字段、新增接口、或用户请求"创建/修改 XX 管理"时使用

  • Works in 6 steps: 数据库 Schema(如需新表) → 类型文件 → Schema 文件 → …
  • Tasks that involve REST APIs
  • SKILL.md covers 模块文件结构, 路由层级, 生成步骤 and 关键规则, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Crud is an agent skill from zhe-qi/clhoria-template. 创建或修改 CRUD 模块。当需要创建新的增删改查 API、修改现有路由模块、添加新字段、新增接口、或用户请求"创建/修改 XX 管理"时使用

Its SKILL.md is about 550 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files (for example `examples/dicts.md`, `templates/handlers.md` and `templates/routes.md`).

It sits in Backend & APIs, covering REST APIs. The repository describes itself as: Production-ready Hono backend template that doubles as an AI agent harness — providing feedforward guides, feedback sensors, and progressive specialization to make AI coding… The licence is MIT.

When your agent uses it

  • Tasks that involve REST APIs

Example prompts

  • “创建/修改 XX 管理”
  • “/crud”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. 数据库 Schema(如需新表)
  2. 类型文件
  3. Schema 文件
  4. 路由文件
  5. 处理器文件
  6. 入口文件

What it can do on your machine

Read from SKILL.md and the folder at commit 589f13e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Crud loads about 552 tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 71 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~19
When it runs · the whole SKILL.md, loaded when a task matches
~552

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from zhe-qi/clhoria-template at commit 589f13e, republished under its MIT licence (© zhe-qi). 71 words, ~552 tokens.

Download SKILL.mdSave it as .claude/skills/crud/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
crud
description
创建或修改 CRUD 模块。当需要创建新的增删改查 API、修改现有路由模块、添加新字段、新增接口、或用户请求"创建/修改 XX 管理"时使用
argument-hint
[tier/feature-name]

CRUD 模块生成/修改指南

模块文件结构

src/routes/{tier}/{category}/{feature}/
├── {feature}.index.ts       # 必需:路由入口
├── {feature}.routes.ts      # 必需:OpenAPI 路由定义
├── {feature}.handlers.ts    # 必需:处理器实现
├── {feature}.types.ts       # 必需:类型定义
├── {feature}.schema.ts      # 可选:Zod 验证
├── {feature}.services.ts    # 可选:复杂业务逻辑或模块内复用
└── __tests__/               # 可选:单元测试

路由层级

Tier路径前缀认证说明
public/api/public/*无公开接口
client/api/client/*JWT客户端用户
admin/api/admin/*JWT + RBAC + 审计后台管理

生成步骤

1. 数据库 Schema(如需新表)

参考 db-schema.md

typescript
// src/db/schema/{tier}/{category}/{feature}.ts
export const {feature}s = snakeCase.table("{tier}_{feature}s", {
  ...baseColumns,
  // 字段定义...
});
2. 类型文件

参考 templates/types.md

3. Schema 文件

参考 zod-schema.md

4. 路由文件

参考 templates/routes.md

5. 处理器文件

参考 templates/handlers.md

6. 入口文件
typescript
// {feature}.index.ts
import { createRouter } from "@/lib/core/create-app";
import * as handlers from "./{feature}.handlers";
import * as routes from "./{feature}.routes";

export default createRouter()
  .openapi(routes.list, handlers.list)
  .openapi(routes.create, handlers.create)
  .openapi(routes.get, handlers.get)
  .openapi(routes.update, handlers.update)
  .openapi(routes.remove, handlers.remove);

关键规则

响应包装(必须)
typescript
return c.json(Resp.ok(data), HttpStatusCodes.OK);
return c.json(Resp.fail("错误信息"), HttpStatusCodes.BAD_REQUEST);
日志格式(必须)
typescript
logger.info({ userId }, "[模块名]: 操作描述");
// 数据对象放第一个参数
审计字段
  • 创建时设置 createdBy: sub
  • 更新时设置 updatedBy: sub
  • sub 从 c.get("jwtPayload") 获取
命名约定
  • 文件:kebab-case(user-roles.ts)
  • 类型:PascalCase(SystemUserRouteHandlerType)
  • 枚举值:UPPER_SNAKE_CASE(Status.ENABLED)

完整示例

参考 examples/dicts.md 查看完整的 dicts 模块实现。

© zhe-qi, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files in .agents/skills/crud of zhe-qi/clhoria-template.

  • SKILL.md
  • examples/dicts.md
  • templates/handlers.md
  • templates/routes.md
  • templates/types.md

Open the folder on GitHubat commit 589f13e

Compare with similar skills

Crud next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Crud compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Crud this skillzhe-qi/clhoria-template193—~552Automated safety check: PassMIT
Paperclippaperclipai/paperclip100k—~9.6kAutomated safety check: PassMIT
Nodejs Backend Patternsever-works/ever-works16218 repos~4kAutomated safety check: PassAGPL-3.0
OpenAPI to MCP Servermcp-use/mcp-use11k—~5.2kAutomated safety check: PassApache-2.0
Use Yaakmountain-loop/yaak19k—~1.9kAutomated safety check: PassMIT
API DesignerJeffallan/claude-skills12k1 repos~2kAutomated safety check: PassMIT

Similar skills

  • Paperclip

    paperclipai/paperclip

    Interact with the Paperclip control plane API for task coordination and governance.

    100k GitHub stars~9.6k tokensUpdated today
    Backend & APIsAuto-check passed
  • Nodejs Backend Patterns

    ever-works/ever-works

    Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices.

    162 GitHub starsUsed in 18 repos~4k tokens
    Backend & APIsAuto-check passed
  • OpenAPI to MCP Server

    mcp-use/mcp-use

    Turns an OpenAPI or Swagger spec into an MCP server with the mcp-use TypeScript SDK, mapping each operation to a tool, wiring auth, testing and deploying.

    11k GitHub stars~5.2k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Use Yaak

    mountain-loop/yaak

    A skill your agent uses when the user mentions Yaak, a Yaak workspace, or the yaak command, or asks to call, hit, or smoke test HTTP/REST endpoints, save or organize API requests for reuse or manual…

    19k GitHub stars~1.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 1 repo~2k tokens
    Backend & APIsAuto-check passed
  • Covers the RuView `wifi-densepose` command line binary, its Axum REST API and the WebAssembly builds for browsers and ESP32, for embedding or scripting RuView.

    97k GitHub stars~1.2k tokensUpdated today
    Backend & APIsAuto-check: notes

More from zhe-qi/clhoria-template

All 10 skills in this repo
  • Effect V4

    zhe-qi/clhoria-template

    Effect v4 模式指南。当需要创建 Effect 服务、定义错误类型、编写 Effect 程序、管理 Layer 组合、或使用 Effect 封装异步操作时使用

    193 GitHub stars~887 tokensUpdated 2 mo ago
    Auto-check passed
  • Bullmq

    zhe-qi/clhoria-template

    创建或修改 BullMQ 队列任务。当需要创建新队列、添加任务类型、注册 Worker、设置定时任务、或用户请求"添加后台任务/队列处理"时使用

    193 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • Create Tier

    zhe-qi/clhoria-template

    创建或修改一个新的 API tier。当用户请求“新增 tier / 创建 partner tier / 新增 merchant 端 / 新增 tenant 端 / 新增 API 端 / 新增一套路由层”时使用。目标是在不修改框架核心的前提下,为新 tier 补齐配置、中间件、类型别名、路由入口和测试。

    193 GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check: notes
  • DB Schema

    zhe-qi/clhoria-template

    创建或修改数据库 Schema。当需要创建新表、修改表结构、定义字段、设置索引约束、或涉及 Drizzle ORM / drizzle-zod 操作时使用

    193 GitHub stars~620 tokensUpdated 2 mo ago
    Auto-check passed
  • Drizzle V1

    zhe-qi/clhoria-template

    Drizzle ORM v1 关系查询指南。当需要定义 Relations v2、编写关系查询、使用 through 多对多、预定义过滤器、或从旧版 Drizzle 迁移时使用

    193 GitHub stars~3k tokensUpdated 2 mo ago
    Auto-check passed
  • Source Command Opsx Explore

    zhe-qi/clhoria-template

    Enter explore mode - think through ideas, investigate problems, clarify requirements

    193 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Crud

What does Crud do?

创建或修改 CRUD 模块。当需要创建新的增删改查 API、修改现有路由模块、添加新字段、新增接口、或用户请求"创建/修改 XX 管理"时使用. Crud is an agent skill from zhe-qi/clhoria-template.

When should I use Crud?

Crud fits situations like: tasks that involve REST APIs.

How do I install Crud in Claude Code?

Run `npx skills add zhe-qi/clhoria-template --skill crud -a claude-code`. Or copy the skill folder (.agents/skills/crud in zhe-qi/clhoria-template) into .claude/skills/crud in your project. Claude Code loads it when a task matches its description.

How do I install Crud in Codex?

Run `npx skills add zhe-qi/clhoria-template --skill crud -a codex`. Or copy the skill folder (.agents/skills/crud in zhe-qi/clhoria-template) into .agents/skills/crud in your project. Codex loads it when a task matches its description.

Can I use Crud in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zhe-qi/clhoria-template --skill crud -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/crud, .gemini/skills/crud, .github/skills/crud and .opencode/skills/crud in your project.

What does Crud need to run?

SKILL.md names no scripts, command-line tools or credentials: Crud is instructions for the agent only.

Does Crud access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Crud safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Crud use?

Crud is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Crud use?

About 552 tokens (SKILL.md is roughly 2.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Crud?

Skills that share tags, products or a category with Crud: Paperclip (paperclipai/paperclip, 100k stars), Nodejs Backend Patterns (ever-works/ever-works, 162 stars), OpenAPI to MCP Server (mcp-use/mcp-use, 11k stars) and Use Yaak (mountain-loop/yaak, 19k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Crud?

zhe-qi (a GitHub user) maintains it in zhe-qi/clhoria-template, which has 193 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on July 30, 2026.

Source: zhe-qi/clhoria-template on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.