db-designer

db-designer is a skill for Claude Code, Codex from miniidealab/openlogos. It costs 0 tokens per session (2,423 once invoked), scanned A, original, Apache-2.0.

A database design assistant that turns an API specification into SQL table definitions for the selected database system.

In plain words
What is it for?
Use it to derive tables from API requests and responses, generate database-specific SQL, plan indexes, and document fields and security rules.
Why use it?
It helps keep stored data, field types, rules, indexes, and access controls aligned with the API. It also identifies when the required API design or database choice is missing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to derive tables from API requests and responses, generate database-specific SQL, plan indexes, and document fields and security rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/miniidealab/openlogos/db-designer
Install

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.

Any agent
npx skills add miniidealab/openlogos --skill db-designer
Clone the repo
git clone --depth 1 https://github.com/miniidealab/openlogos

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for db-designer

README.md
[![agentmods](https://agentmods.dev/badge/skills/miniidealab/openlogos/db-designer/github.svg)](https://agentmods.dev/skills/miniidealab/openlogos/db-designer)
Your own site
<a href="https://agentmods.dev/skills/miniidealab/openlogos/db-designer"><img src="https://agentmods.dev/badge/skills/miniidealab/openlogos/db-designer/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.

agentmods 80×15 button for db-designer

Your own site · 80×15
<a href="https://agentmods.dev/skills/miniidealab/openlogos/db-designer"><img src="https://agentmods.dev/badge/skills/miniidealab/openlogos/db-designer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,423 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02423
Opus 5.5 $0.00000 $0.00969
Sonnet 5.5 $0.00000 $0.00485
Haiku 4.5 $0.00000 $0.00242

Measured 3mo ago against content hash ea65b2f6edcd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

db-designer 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 3mo 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.

examples/flowtask/logos/skills/db-designer/SKILL.md · 213 lines

How it starts

The opening of the file, as written. The whole thing — 213 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: DB Designer

从 API 规格推导数据库表结构,生成对应方言的 SQL DDL。数据库类型由 Phase 3 Step 0 技术选型确定,确保字段类型、约束、索引和安全策略与 API 端点完全对齐。

触发条件

  • 用户要求设计数据库或编写 SQL
  • 用户提到 "Phase 3 Step 2"、"DB 设计"、"表结构"
  • 已有 API YAML 规格,需要推导数据库设计
  • 用户提供了数据模型需要转化为 DDL

核心能力

  1. 从 API 请求/响应结构推导表结构
  2. 读取 logos-project.yaml 的 tech_stack.database 确定数据库类型
  3. 生成对应数据库方言的 SQL DDL
  4. 设计索引并说明设计理由
  5. 设计安全策略(RLS / 应用层权限)
  6. 为每张表、每个字段添加注释

前置依赖

  • logos/resources/api/ 中包含 API YAML 规格(api-designer 产出)
  • logos-project.yaml 的 tech_stack.database 已填写

如果 API 目录为空,提示用户先完成 Phase 3 Step 2 的 API 设计(api-designer)。如果 tech_stack.database 未填写,提示用户先完成 Phase 3 Step 0(architecture-designer)。

执行步骤

Step 1: 确认数据库类型

读取 logos/logos-project.yaml 的 tech_stack 字段,确定数据库类型和方言:

  • PostgreSQL → 使用 UUID、TIMESTAMPTZ、RLS、JSONB 等特性
  • MySQL → 使用 InnoDB、utf8mb4、TIMESTAMP 等特性
  • SQLite → 使用 INTEGER PRIMARY KEY、TEXT 等简化类型
  • 其他 → 与用户确认后选择最接近的方言

Step 2: 提取数据实体

从 API YAML 中提取所有需要持久化的数据实体:

  1. 扫描所有端点的 requestBody 和 responses,识别核心数据对象
  2. 区分"需要持久化"与"仅传输用"的数据:
    • 有 CRUD 操作的对象 → 需要建表(如 users、projects)
    • 只出现在请求/响应中但不直接存储的 → 不建表(如 loginRequest)
  3. 为每个对象标注来源 API 端点

输出实体清单供用户确认:

从 API 规格中识别到 N 个需要持久化的数据实体:

| # | 实体 | 来源端点 | 核心字段 |
|---|------|---------|---------|
| 1 | users | auth.yaml → register, login | email, password, status |
| 2 | projects | projects.yaml → create, list, get | name, description, owner_id |
| 3 | subscriptions | billing.yaml → subscribe | plan, status, expires_at |

Step 3: 设计表结构

为每个实体设计完整的表结构,遵循当前数据库方言:

每张表必须包含:

  • 主键(UUID 或自增 ID,视方言决定)
  • 业务字段(从 API schema 映射,类型转换为数据库类型)
  • 审计字段:created_at、updated_at
  • 软删除字段:deleted_at(按需)
  • 字段约束:NOT NULL、UNIQUE、CHECK、DEFAULT

类型映射原则:

  • API string + format: email → TEXT NOT NULL(配合 CHECK 约束或应用层校验)
  • API string + format: uuid → UUID(PostgreSQL)/ CHAR(36)(MySQL)
  • API integer → INTEGER / BIGINT
  • API boolean → BOOLEAN(PostgreSQL)/ TINYINT(1)(MySQL)
  • API string + enum → TEXT + CHECK 约束(列出枚举值)
  • 金额字段 → INTEGER(存分值),禁止 DECIMAL/FLOAT

Read the full file on GitHub · 213 lines

Changes

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.

  1. 3mo ago First seen · 213 lines · 0 tokens per session scan A ea65b2f6edcd

Subscribe to this mod's changes

db-designer is a skill published in the GitHub repository miniidealab/openlogos (582 stars, last pushed 2d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,423 tokens. 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-08-30.

Related

db-designer compared with skills from other repositories

db-designer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
db-designerminiidealab/openlogosSkill5822d agoApache-2.0A0Claude Code, Codex
event-store-designwshobson/agentsSkill43k2d agoMITA33Claude Code
platform-custom-field-generateforcedotcom/sf-skillsSkill1.2k5d agoApache-2.0A139Claude Code
durable-objectsfcakyon/claude-codex-settingsSkill1.2ktodayApache-2.0A22Claude Code
field-service-sobject-create-configureforcedotcom/sf-skillsSkill1.2k5d agoApache-2.0A74Claude Code
nornicdb-grpcorneryd/NornicDBSkill937todayMITA98Claude Code, Codex
firebaseericrisco/rsc-harnessSkill695yesterdayMITA77Claude Code, Codex