首页龙虾技能列表 › DB Design — 数据库设计

DB Design — 数据库设计

v1.0.0

数据库设计工具。

0· 117·0 当前·0 累计
by @codekungfu (ClawKK)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/27
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill is a purely instructional, coherent database-design workflow that asks for no credentials, binaries, or installs and stays within its stated scope.
评估建议
This skill is guidance-only and appears internally consistent. Before using it in an agent that can act autonomously, note that the skill does not perform migrations or modify systems itself — if you pair it with a migration tool (the doc even suggests db-migrate), review that tool’s install, permissions, and credential needs separately. Also validate any vendor-specific constraints (Postgres, MySQL, cloud-managed DBs) when applying the generic guidance to production systems.
详细分析 ▾
用途与能力
Name and description match the SKILL.md: a six-stage DB design workflow for OLTP schemas. Nothing requested (no env vars, binaries, or installs) is outside what a design workflow would need.
指令范围
Instructions are guidance-only (requirements gathering, modeling, indexing, migrations planning). They do not instruct reading files, accessing environment variables, contacting external endpoints, or performing actions outside design/review tasks.
安装机制
No install spec and no code files. Because this is instruction-only, nothing is written to disk and there is no installation risk.
凭证需求
The skill requests no credentials, config paths, or environment variables — appropriate for a design/review workflow that should not need secrets or system access.
持久化与权限
always is false, no special persistence or cross-skill config modifications are requested. Autonomous invocation is allowed by platform default but does not add extra privileges for this instruction-only skill.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/3/27

db-design 1.0.0 – Initial release - Introduces a structured six-stage workflow for relational database (OLTP) schema design and review. - Covers domain and access patterns, entity & relationship modeling, key & constraint strategies, normalization vs denormalization, indexing, and operational concerns. - Includes triggers for when to use the workflow, expected exit conditions, and a final review checklist. - Provides specific multi-tenant considerations and high-level tips for schema evolution. - Designed for both greenfield projects and performance/integrity reviews.

● 无害

安装命令 点击复制

官方npx clawhub@latest install db-design
镜像加速npx clawhub@latest install db-design --registry https://cn.clawhub-mirror.com

技能文档

Good OLTP design balances integrity, write paths, query patterns, and evolution—not “third normal form everywhere.”

当...时 到 Offer Workflow

Trigger conditions:

  • Greenfield 服务 schema 或 major 新的 domain
  • Performance 或 integrity issues 从 ad-hoc tables
  • Multi-tenant isolation questions

Initial offer:

Use six stages: (1) domain & access patterns, (2) entities & relationships, (3) keys & constraints, (4) normalization trade-offs, (5) indexing & performance, (6) operations & evolution). Confirm RDBMS and scale expectations.


Stage 1: Domain & Access Patterns

Goal: 列表 critical queries 和 writes: QPS, joins, filters, hot rows.

Exit 条件: Top access paths ranked 由 business importance.


Stage 2: Entities & Relationships

Goal: ER 模型; cardinality; 可选 vs 必填 relationships.

Practices

  • 清除 表 names; avoid opaque “data” blobs unless documented

Stage 3: Keys & Constraints

Goal: Primary keys (surrogate vs natural); foreign keys 带有 explicit 在...上 删除 policy; unique constraints 对于 business rules.

Multi-tenant

  • tenant_id 在...上 rows 需要 isolation; composite keys 或 indexes 作为 appropriate

Stage 4: Normalization Trade-offs

Goal: Normalize 到 归约 更新 anomalies; denormalize 读取 hotspots 带有 documented trade-offs.


Stage 5: Indexing & Performance

Goal: Indexes serve real queries; watch 写入 amplification 和 索引 bloat.


Stage 6: Operations & Evolution

Goal: Migration strategy (expand/contract); 备份/恢复; PII columns flagged.


Final Review Checklist

  • [ ] Access patterns drive schema
  • [ ] Keys, FKs, 和 constraints explicit
  • [ ] Multi-tenant isolation 如果 applicable
  • [ ] Normalization decisions justified
  • [ ] 索引 plan aligned 带有 queries
  • [ ] Migration 和 ops considerations noted

Tips 对于 Effective Guidance

  • 空 semantics 和 defaults matter 对于 bugs 和 migrations.
  • Pair 带有 db-迁移 对于 在线 schema changes.

Handling Deviations

  • Document stores: embed vs reference 带有 consistency story.
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务