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.
npx skills add jiushiwon/wg-skills --skill database-design-skillgit clone --depth 1 https://github.com/jiushiwon/wg-skillsWrote 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/skills/jiushiwon/wg-skills/database-design-skill)<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/database-design-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/database-design-skill/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/skills/jiushiwon/wg-skills/database-design-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/database-design-skill.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.00112 | $0.02780 |
| Opus 5.5 | $0.00045 | $0.01112 |
| Sonnet 5.5 | $0.00022 | $0.00556 |
| Haiku 4.5 | $0.00011 | $0.00278 |
Grade A, and why
database-design-skill 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 23d 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.
How it starts
The opening of the file, as written. The whole thing — 312 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Design Skill
数据库设计规范体系——AI 生成代码时必须遵循的统一标准。
核心理念
AI 天然会建表,但建得好不好是另一回事。
本 skill 定义了一套完整的数据库设计规范,确保 AI 生成的后端项目:
- 表结构统一、规范、易维护
- 索引合理、性能有保障
- 关联清晰、不易出错
- 支持扩展、能应对分库分表
一、表名与字段名规范
1.1 命名原则
| 原则 | 说明 | 示例 |
|---|---|---|
| 英文小写 | 全部小写,用下划线分隔 | user_name,不是 userName |
| 有含义 | 用完整英文单词,不用缩写 | created_at,不是 ctime |
| 表前缀 | 统一前缀,默认 wg_ |
wg_user,wg_order |
| 单数名词 | 表名用单数 | wg_user,不是 wg_users |
1.2 基础字段(所有表必须有)
-- PostgreSQL 示例:业务表基础字段
CREATE TABLE "wg_user" (
"id" BIGSERIAL PRIMARY KEY,
"status" SMALLINT NOT NULL DEFAULT 1,
"created_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
"deleted_at" TIMESTAMP DEFAULT NULL
);
COMMENT ON TABLE "wg_user" IS '用户表';
COMMENT ON COLUMN "wg_user"."status" IS '状态:0-禁用 1-正常';
COMMENT ON COLUMN "wg_user"."created_at" IS '创建时间';
COMMENT ON COLUMN "wg_user"."updated_at" IS '更新时间';
COMMENT ON COLUMN "wg_user"."deleted_at" IS '软删除时间戳';
1.3 字段类型选择
| 数据类型 | MySQL | PostgreSQL | 场景 |
|---|---|---|---|
| 主键 | BIGINT UNSIGNED | BIGSERIAL | 自增主键 |
| 状态 | TINYINT | SMALLINT | 0/1/2 等状态码 |
| 布尔 | TINYINT(1) | BOOLEAN | true/false |
| 时间 | DATETIME | TIMESTAMP | 创建/更新时间 |
| 枚举 | ENUM / TINYINT | CHECK 约束 | 有限选项 |
| 大文本 | TEXT | TEXT | 长文本 |
| JSON | JSON / JSONB | JSONB | 动态结构(PG 推荐) |
二、索引设计规范
2.1 索引类型选择
| 索引 | 场景 | 示例 |
|---|---|---|
| 主键索引 | id 字段,自动唯一 | PRIMARY KEY |
| 唯一索引 | 唯一约束字段 | uk_username on username |
| 普通索引 | WHERE 常用字段 | idx_status on status |
| 复合索引 | 多条件查询 | idx_status_created on (status, created_at) |
2.2 复合索引最左前缀原则
-- 复合索引 (status, created_at, user_id)
-- ✅ 能命中:WHERE status = 1
-- ✅ 能命中:WHERE status = 1 AND created_at > '2024-01-01'
-- ✅ 能命中:WHERE status = 1 AND created_at > '2024-01-01' AND user_id = 1
-- ❌ 不能命中:WHERE created_at > '2024-01-01'
-- ❌ 不能命中:WHERE user_id = 1
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 23d ago Changed · +2 lines 30332c44f836
- 2mo ago First seen · 310 lines · 112 tokens per session scan A b85a5a7618dd
database-design-skill is a skill published in the GitHub repository jiushiwon/wg-skills (154 stars, last pushed 6d ago), licensed Apache-2.0. It adds 112 tokens to every session and 2,780 once invoked, about $0.0004 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-15.
database-design-skill compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| database-design-skilljiushiwon/wg-skills | Skill | 154 | 6d ago | Apache-2.0 | A | 112 | Claude Code, Codex |
| create-prprisma/orm | Skill | 48k | today | Apache-2.0 | A | 47 | Claude Code, Codex |
| schema-explorationlangchain-ai/deepagents | Skill | 32k | today | MIT | A | 57 | Claude Code, Codex |
| atlas-mssqlariga/atlas | Skill | 8.9k | 5d ago | Apache-2.0 | A | 163 | Claude Code |
| ha-data-storesshiwenwen/hope-agent | Skill | 1.9k | today | MIT | A | 115 | Claude Code, Codex |
| pentesting-mysqlxalgorix/xalgorix | Skill | 1.5k | yesterday | Apache-2.0 | A | 65 | Claude Code, Codex |
| nornicdb-cypher-queriesorneryd/NornicDB | Skill | 937 | today | MIT | A | 79 | Claude Code, Codex |