← 返回 Skills 市场
codekungfu

Db Design

作者 ClawKK · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
192
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install db-design
功能描述
Deep database design workflow—entities and relationships, keys and constraints, normalization vs denormalization, indexing strategy, integrity, and operation...
使用说明 (SKILL.md)

DB Design

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

When to Offer This Workflow

Trigger conditions:

  • Greenfield service schema or major new domain
  • Performance or integrity issues from 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: List critical queries and writes: QPS, joins, filters, hot rows.

Exit condition: Top access paths ranked by business importance.


Stage 2: Entities & Relationships

Goal: ER model; cardinality; optional vs required relationships.

Practices

  • Clear table names; avoid opaque “data” blobs unless documented

Stage 3: Keys & Constraints

Goal: Primary keys (surrogate vs natural); foreign keys with explicit ON DELETE policy; unique constraints for business rules.

Multi-tenant

  • tenant_id on rows that need isolation; composite keys or indexes as appropriate

Stage 4: Normalization Trade-offs

Goal: Normalize to reduce update anomalies; denormalize read hotspots with documented trade-offs.


Stage 5: Indexing & Performance

Goal: Indexes serve real queries; watch write amplification and index bloat.


Stage 6: Operations & Evolution

Goal: Migration strategy (expand/contract); backup/restore; PII columns flagged.


Final Review Checklist

  • Access patterns drive schema
  • Keys, FKs, and constraints explicit
  • Multi-tenant isolation if applicable
  • Normalization decisions justified
  • Index plan aligned with queries
  • Migration and ops considerations noted

Tips for Effective Guidance

  • NULL semantics and defaults matter for bugs and migrations.
  • Pair with db-migrate for online schema changes.

Handling Deviations

  • Document stores: embed vs reference with consistency story.
安全使用建议
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.
功能分析
Type: OpenClaw Skill Name: db-design Version: 1.0.0 The skill bundle provides a structured instructional workflow for database design, covering entities, relationships, normalization, and operational concerns. It contains no executable code, network requests, or malicious instructions, and actually encourages security-positive practices like multi-tenant isolation and PII flagging in SKILL.md.
能力评估
Purpose & Capability
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.
Instruction Scope
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.
Install Mechanism
No install spec and no code files. Because this is instruction-only, nothing is written to disk and there is no installation risk.
Credentials
The skill requests no credentials, config paths, or environment variables — appropriate for a design/review workflow that should not need secrets or system access.
Persistence & Privilege
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install db-design
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /db-design 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
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.
元数据
Slug db-design
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Db Design 是什么?

Deep database design workflow—entities and relationships, keys and constraints, normalization vs denormalization, indexing strategy, integrity, and operation... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 192 次。

如何安装 Db Design?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install db-design」即可一键安装,无需额外配置。

Db Design 是免费的吗?

是的,Db Design 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Db Design 支持哪些平台?

Db Design 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Db Design?

由 ClawKK(@codekungfu)开发并维护,当前版本 v1.0.0。

💬 留言讨论