db-schema-designer

db-schema-designer is a skill for Claude Code from Dokkabei97/forged-claude-code. It costs 49 tokens per session (896 once invoked), scanned A, original, MIT.

A database design tool that turns a description of your data into tables or collections, relationships, migrations, indexes, and an ERD. An ERD, or entity-relationship diagram, shows how pieces of stored data connect.

In plain words
What is it for?
Use it to model data for a new project, add an entity or table, generate PostgreSQL, MySQL, or MongoDB schemas, and create Prisma, Drizzle, SQLAlchemy, or SQL migration files.
Why use it?
It removes the need to translate business concepts into database structure manually. It helps keep relationships, indexes, and change scripts consistent across common databases and code libraries.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the forged-claude-code plugin — 29 skills, 14 commands, 9 agents, 2 hooks shipped together

Good fit Use it to model data for a new project, add an entity or table, generate PostgreSQL, MySQL, or MongoDB schemas, and create Prisma, Drizzle, SQLAlchemy, or SQL migration files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dokkabei97/forged-claude-code/db-schema-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 Dokkabei97/forged-claude-code --skill db-schema-designer
Clone the repo
git clone --depth 1 https://github.com/Dokkabei97/forged-claude-code

Made for: Claude Code.

Or install forged-claude-code, the plugin that ships this one along with the rest of its 29 skills, 14 commands, 9 agents, 2 hooks.

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-schema-designer

README.md
[![agentmods](https://agentmods.dev/badge/skills/dokkabei97/forged-claude-code/db-schema-designer.svg)](https://agentmods.dev/skills/dokkabei97/forged-claude-code/db-schema-designer)
Your own site
<a href="https://agentmods.dev/skills/dokkabei97/forged-claude-code/db-schema-designer"><img src="https://agentmods.dev/badge/skills/dokkabei97/forged-claude-code/db-schema-designer.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 896 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.
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.00049 $0.00896
Opus 5 $0.00024 $0.00448
Sonnet 5 $0.00010 $0.00179
Haiku 4.5 $0.00005 $0.00090

Measured 8d ago against content hash 114b6fa009c5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

db-schema-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 8d 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.

skills/cto/db-schema-designer/SKILL.md · 149 lines

How it starts

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

DB Schema Designer - Database Schema Design

Overview

Transforms domain descriptions into optimized database schemas with migrations, indexes, and relationship diagrams.


1. When to Apply

Trigger Behavior
New project data modeling Full schema design workflow
"database schema", "ERD" Interactive schema builder
Adding new entity/table Incremental schema update

2. Design Workflow

Step 1: Domain Analysis

From user description, extract:

  • Entities: Nouns → tables/collections
  • Relationships: Verbs → foreign keys/references
  • Attributes: Properties → columns/fields
  • Cardinality: one-to-one, one-to-many, many-to-many

Step 2: Schema Generation

Prisma Example:

model User {
  id        String   @id @default(cuid())
  email     String   @unique
  name      String?
  role      Role     @default(USER)
  posts     Post[]
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt

  @@index([email])
}

model Post {
  id        String   @id @default(cuid())
  title     String
  content   String?
  published Boolean  @default(false)
  author    User     @relation(fields: [authorId], references: [id])
  authorId  String
  tags      Tag[]
  createdAt DateTime @default(now())

  @@index([authorId])
  @@index([published, createdAt])
}

Step 3: Index Strategy

## Index Recommendations

| Table | Index | Type | Reason |
|-------|-------|------|--------|
| users | email | UNIQUE | Login lookup |
| posts | authorId | B-TREE | Filter by author |
| posts | (published, createdAt) | COMPOSITE | Published feed query |
| posts | title | GIN (trigram) | Full-text search |

Step 4: Migration Script

Generate migration for chosen ORM/tool.

Step 5: ERD (Mermaid)

erDiagram
    User ||--o{ Post : writes
    Post }o--o{ Tag : has
    User {
        string id PK
        string email UK
        string name
        enum role
    }
    Post {
        string id PK
        string title
        string content
        boolean published
        string authorId FK
    }

Read the full file on GitHub · 149 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. 8d ago First seen · 149 lines · 49 tokens per session scan A 114b6fa009c5

Subscribe to this mod's changes

db-schema-designer is a skill published in the GitHub repository Dokkabei97/forged-claude-code (2 stars, last pushed 6mo ago), licensed MIT. It adds 49 tokens to every session and 896 once invoked, about $0.0002 per session on Opus 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-08-31.

Related

Other skills, from other repositories

database-expert

Advanced database design and administration for PostgreSQL, MongoDB, and Redis. Use when designing schemas, optimizing queries, managing database performance, or implementing data patterns.

travisjneuman/.claude · 36 tokens

software-database-design

Designs database schemas, migrations, and data models for PostgreSQL, MySQL, MongoDB, and Redis. Use when planning tables, relationships, indexes, or ORM-backed schema changes.

vasilyu1983/AI-Agents-public · 43 tokens

database-migrator

Migrates databases between providers (Postgres, MySQL, Supabase, PlanetScale, MongoDB). Reads source schema, generates migration scripts, handles data type mapping, foreign keys, indexes, triggers, stored procedures. Validates migration with row counts and checksums. Generates migration-plan.md with step-by-step…

OneWave-AI/claude-skills · 76 tokens

database-schema-designer

Design optimized database schemas for SQL and NoSQL databases including tables, relationships, indexes, and constraints. Creates ERD diagrams, migration scripts, and data modeling best practices. Use when users need database design, schema optimization, or data architecture planning.

OneWave-AI/claude-skills · 54 tokens

database-patterns

Database design and implementation patterns for modern applications. Use when designing schemas, writing migrations, optimizing queries, and configuring ORMs. Covers PostgreSQL, MongoDB, Prisma, Drizzle, indexing strategies, and security best practices.

shahtuyakov/claude-setup · 49 tokens

postgresql-table-design

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

wshobson/agents · 37 tokens