Better Drizzle
almeidazs/better-drizzle
Write, review, and debug code that uses better-drizzle, the typed repository layer over Drizzle ORM 1.x (better(db), client.users.findMany, paginate, cursor, upsertMany, relation include/connect…
创建或修改数据库 Schema。当需要创建新表、修改表结构、定义字段、设置索引约束、或涉及 Drizzle ORM / drizzle-zod 操作时使用
$ npx skills add zhe-qi/clhoria-template --skill db-schema -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install zhe-qi/clhoria-template db-schema --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/zhe-qi/clhoria-template.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/db-schema .claude/skills/db-schema && rm -rf skills-srcUse ~/.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/
Install the "db-schema" agent skill from https://github.com/zhe-qi/clhoria-template/tree/main/.agents/skills/db-schema into .claude/skills/db-schema/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "db-schema", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/zhe-qi/clhoria-template/tree/main/.agents/skills/db-schemaType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add zhe-qi/clhoria-template --skill db-schema -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install zhe-qi/clhoria-template db-schema --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zhe-qi/clhoria-template.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/db-schema .agents/skills/db-schema && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "db-schema" agent skill from https://github.com/zhe-qi/clhoria-template/tree/main/.agents/skills/db-schema into .agents/skills/db-schema/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "db-schema", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add zhe-qi/clhoria-template --skill db-schema -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install zhe-qi/clhoria-template db-schema --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zhe-qi/clhoria-template.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/db-schema .cursor/skills/db-schema && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "db-schema" agent skill from https://github.com/zhe-qi/clhoria-template/tree/main/.agents/skills/db-schema into .cursor/skills/db-schema/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "db-schema", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/zhe-qi/clhoria-template.git --path .agents/skills/db-schema--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add zhe-qi/clhoria-template --skill db-schema -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install zhe-qi/clhoria-template db-schema --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zhe-qi/clhoria-template.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/db-schema .gemini/skills/db-schema && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "db-schema" agent skill from https://github.com/zhe-qi/clhoria-template/tree/main/.agents/skills/db-schema into .gemini/skills/db-schema/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "db-schema", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install zhe-qi/clhoria-template db-schemaInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add zhe-qi/clhoria-template --skill db-schema -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/zhe-qi/clhoria-template.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/db-schema .github/skills/db-schema && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "db-schema" agent skill from https://github.com/zhe-qi/clhoria-template/tree/main/.agents/skills/db-schema into .github/skills/db-schema/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "db-schema", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add zhe-qi/clhoria-template --skill db-schema -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install zhe-qi/clhoria-template db-schema --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zhe-qi/clhoria-template.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/db-schema .opencode/skills/db-schema && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "db-schema" agent skill from https://github.com/zhe-qi/clhoria-template/tree/main/.agents/skills/db-schema into .opencode/skills/db-schema/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "db-schema", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
db-schema创建或修改数据库 Schema。当需要创建新表、修改表结构、定义字段、设置索引约束、或涉及 Drizzle ORM / drizzle-zod 操作时使用
DB Schema is an agent skill from zhe-qi/clhoria-template. 创建或修改数据库 Schema。当需要创建新表、修改表结构、定义字段、设置索引约束、或涉及 Drizzle ORM / drizzle-zod 操作时使用
Its SKILL.md is about 620 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `templates/migration.md` and `templates/postgresql-design.md`).
It sits in Databases, covering ORMs and data access and Forms and validation. It works with Zod, Drizzle ORM and PostgreSQL. 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.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 589f13e. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
pnpmFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
DB Schema loads about 620 tokens when it runs. Until then it costs about 22 tokens; SKILL.md has 140 words of instructions outside code blocks.
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.
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.
The full file from zhe-qi/clhoria-template at commit 589f13e, republished under its MIT licence (© zhe-qi). 140 words, ~620 tokens.
.claude/skills/db-schema/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.src/db/schema/
├── _shard/ # 共享定义
│ ├── base-columns.ts # 基础列(id/createdAt/updatedAt/createdBy/updatedBy)
│ ├── enums.ts # 数据库枚举定义
│ └── types/ # 共享类型
├── _infra/ # 基础设施表(非业务表)
│ └── queue/ # 队列任务
├── admin/ # 管理端表
│ ├── system/ # 系统管理
│ └── auth/ # 认证相关
├── client/ # 客户端表
└── index.ts # 统一导出注意:
_infra目录使用下划线前缀,存放基础设施相关的表(如审计日志、队列任务记录等),与业务表分开管理。
import db from "@/db"; // 数据库实例(default export)
import { users } from "@/db/schema"; // Schema 定义{tier}_{feature}s(如 system_users){表名}_{字段名}_idxid// 正确:批量插入
db.insert(table).values([...items])
// 错误:循环单条插入
for (const item of items) {
db.insert(table).values(item) // 不要这样做
}参考 db-schema.md
包含:
包含:
包含:
参考 migration.md
包含:
src/db/schema/{tier}/{category}/ 下创建文件src/db/schema/index.ts 中导出pnpm push(开发环境)pnpm push(开发环境)pnpm generate # 生成迁移文件
pnpm migrate # 执行迁移meta/ 文件夹;未执行的迁移文件可以修改或删除后重新生成© 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
SKILL.md and 2 other files in .agents/skills/db-schema of zhe-qi/clhoria-template.
Open the folder on GitHubat commit 589f13e
DB Schema 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| DB Schema this skillzhe-qi/clhoria-template | 193 | — | ~620 | Automated safety check: Pass | MIT | |
| Better Drizzlealmeidazs/better-drizzle | 348 | — | ~1.7k | Automated safety check: Pass | Apache-2.0 | |
| Nestjs Drizzle Crud Generatorgiuseppe-trisciuoglio/developer-kit | 356 | — | ~1.3k | Automated safety check: Notes | MIT | |
| Drizzle Sqlite Scaffoldpproenca/dot-skills | 215 | — | ~4k | Automated safety check: Pass | MIT | |
| Safe SQL Executionsupabase/supabase | 111k | — | ~4.2k | Automated safety check: Pass | Apache-2.0 | |
| Drizzle DatabaseChatbotXIO/ChatbotX | 881 | — | ~2.1k | Automated safety check: Pass | Custom licence |
almeidazs/better-drizzle
Write, review, and debug code that uses better-drizzle, the typed repository layer over Drizzle ORM 1.x (better(db), client.users.findMany, paginate, cursor, upsertMany, relation include/connect…
giuseppe-trisciuoglio/developer-kit
Generates complete CRUD modules for NestJS applications with Drizzle ORM.
pproenca/dot-skills
Scaffolds Drizzle ORM + SQLite boilerplate — a new drizzle.config.ts, a singleton client with the right pragmas, per-table schema files with explicit primary keys/indexed foreign…
supabase/supabase
A skill your agent uses whenever code will build, return, fetch, or execute SQL that runs against a user's real Postgres database — even when the request reads like an ordinary feature or bug fix…
ChatbotXIO/ChatbotX
Work with Drizzle ORM database schema, migrations, relations, and queries in PostgreSQL.
lobehub/lobehub
Style guide for Drizzle ORM schemas and queries in LobeHub: file layout, naming, timestamp helpers, primary keys, indexes, relations and inferred types.
zhe-qi/clhoria-template
Effect v4 模式指南。当需要创建 Effect 服务、定义错误类型、编写 Effect 程序、管理 Layer 组合、或使用 Effect 封装异步操作时使用
zhe-qi/clhoria-template
创建或修改 BullMQ 队列任务。当需要创建新队列、添加任务类型、注册 Worker、设置定时任务、或用户请求"添加后台任务/队列处理"时使用
zhe-qi/clhoria-template
创建或修改一个新的 API tier。当用户请求“新增 tier / 创建 partner tier / 新增 merchant 端 / 新增 tenant 端 / 新增 API 端 / 新增一套路由层”时使用。目标是在不修改框架核心的前提下,为新 tier 补齐配置、中间件、类型别名、路由入口和测试。
zhe-qi/clhoria-template
创建或修改 CRUD 模块。当需要创建新的增删改查 API、修改现有路由模块、添加新字段、新增接口、或用户请求"创建/修改 XX 管理"时使用
zhe-qi/clhoria-template
Drizzle ORM v1 关系查询指南。当需要定义 Relations v2、编写关系查询、使用 through 多对多、预定义过滤器、或从旧版 Drizzle 迁移时使用
zhe-qi/clhoria-template
Enter explore mode - think through ideas, investigate problems, clarify requirements
Works with
Categories
创建或修改数据库 Schema。当需要创建新表、修改表结构、定义字段、设置索引约束、或涉及 Drizzle ORM / drizzle-zod 操作时使用. DB Schema is an agent skill from zhe-qi/clhoria-template.
DB Schema fits situations like: tasks that involve ORMs and data access; tasks that involve Forms and validation.
Run `npx skills add zhe-qi/clhoria-template --skill db-schema -a claude-code`. Or copy the skill folder (.agents/skills/db-schema in zhe-qi/clhoria-template) into .claude/skills/db-schema in your project. Claude Code loads it when a task matches its description.
Run `npx skills add zhe-qi/clhoria-template --skill db-schema -a codex`. Or copy the skill folder (.agents/skills/db-schema in zhe-qi/clhoria-template) into .agents/skills/db-schema in your project. Codex loads it when a task matches its description.
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 db-schema -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/db-schema, .gemini/skills/db-schema, .github/skills/db-schema and .opencode/skills/db-schema in your project.
Going by SKILL.md and its folder, DB Schema needs the command-line tools its instructions call (pnpm).
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.
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.
DB Schema is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 620 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with DB Schema: Better Drizzle (almeidazs/better-drizzle, 348 stars), Nestjs Drizzle Crud Generator (giuseppe-trisciuoglio/developer-kit, 356 stars), Drizzle Sqlite Scaffold (pproenca/dot-skills, 215 stars) and Safe SQL Execution (supabase/supabase, 111k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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.