Agent skill

Database Schema Designer

by OneWave-AI in OneWave-AI/claude-skills

Designs relational and document database schemas from requirements or an existing app - tables and collections, keys, relationships, constraints, indexes driven by real query patterns, ERDs, and…

MITAuto-check passedDatabases

Install Database Schema Designer

skills CLI
$ npx skills add OneWave-AI/claude-skills --skill database-schema-designer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OneWave-AI/claude-skills database-schema-designer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OneWave-AI/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/database-schema-designer .claude/skills/database-schema-designer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
database-schema-designer
GitHub stars
328
Token cost
~1.6k tokens
SKILL.md length
794 words
Files
5 (incl. references)
Skills in repo
69
Repo updated
First seen
Licence
MIT

At a glance

Designs relational and document database schemas from requirements or an existing app - tables and collections, keys, relationships, constraints, indexes driven by real query patterns, ERDs, and…

  • Works in 7 steps: Collect requirements. Get from the… → Model entities and relationships. List… → Choose keys and types using… → …
  • The user wants to model data for a new app
  • SKILL.md covers Workflow, Checks before delivering, Worked example and Failure modes
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Database Schema Designer is an agent skill from OneWave-AI/claude-skills. Designs relational and document database schemas from requirements or an existing app - tables and collections, keys, relationships, constraints, indexes driven by real query patterns, ERDs, and reversible migration scripts - with PostgreSQL (including Supabase) as the default and MySQL, SQLite, and MongoDB supported. Use when the user wants to model data for a new app or feature, review or fix an existing schema, choose keys or indexes, plan multi-tenancy, normalize or denormalize, or write CREATE TABLE…

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/other-engines.md`, `references/output-format.md` and `references/postgres.md`).

It sits in Databases, covering NoSQL databases, Database schema design and Multi-tenancy. It works with PostgreSQL, Supabase, MongoDB and MySQL. The repository describes itself as: 200+ production-ready Claude Code skills for sales, marketing, design, engineering, and AI agent architecture. Built and maintained by OneWave AI. The licence is MIT.

When your agent uses it

  • The user wants to model data for a new app
  • Fix an existing schema
  • Plan multi-tenancy
  • Write CREATE TABLE statements

Example prompts

  • “how should I store this”
  • “Use the database-schema-designer skill to design relational and document database schemas from requirements or an existing app - tables and…”
  • “/database-schema-designer”

Requirements

  • Docker

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Collect requirements. Get from the conversation or codebase, and ask only for what blocks the design
  2. Model entities and relationships. List entities, attributes, and cardinality (1:1, 1:N, N:M). Normalize to 3NF by default; denormalize…
  3. Choose keys and types using references/postgres.md (or references/other-engines.md for MySQL, SQLite, MongoDB). Defaults for Postgres…
  4. Encode the rules as constraints. NOT NULL wherever a value is required, UNIQUE for natural keys, CHECK for ranges and allowed values…
  5. Derive indexes from the queries in step 1, not from a checklist. For each query, name the index that serves it. Index every foreign key…
  6. Write the deliverable: DDL, ERD, index rationale, and migrations with rollback, using references/schema-templates.md and the layout in…
  7. Verify. If a database is available (local Postgres, Docker postgres:18, a Supabase branch), run the DDL, insert a few rows, and EXPLAIN…

What it can do on your machine

Read from SKILL.md and the folder at commit fc5b785. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Database Schema Designer loads about 1.6k tokens when it runs, and up to ~6.5k if it reads all its reference files. Until then it costs about 175 tokens; SKILL.md has 794 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~175
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from OneWave-AI/claude-skills at commit fc5b785, republished under its MIT licence (© OneWave-AI). 794 words, ~1,566 tokens.

Download SKILL.mdSave it as .claude/skills/database-schema-designer/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
database-schema-designer
description
Designs relational and document database schemas from requirements or an existing app - tables and collections, keys, relationships, constraints, indexes driven by real query patterns, ERDs, and reversible migration scripts - with PostgreSQL (including Supabase) as the default and MySQL, SQLite, and MongoDB supported. Use when the user wants to model data for a new app or feature, review or fix an existing schema, choose keys or indexes, plan multi-tenancy, normalize or denormalize, or write CREATE TABLE statements or migrations, even if they just describe their app and ask "how should I store this". For moving data between database providers, use database-migrator.

Database Schema Designer

Design a schema that enforces the data's rules in the database and makes the app's real queries fast.

Workflow

  1. Collect requirements. Get from the conversation or codebase, and ask only for what blocks the design:

    • Engine and version (default: PostgreSQL 18; check docker-compose.yml, ORM config, or Supabase project if present)
    • Entities and how they relate, in plain language
    • The 5-10 most frequent or most important queries, including filters and sort order
    • Volume and growth (rows per table per year), read/write mix
    • Tenancy (single app, multi-tenant by organization), retention, audit, and compliance needs (PII, deletion requests)
    • ORM or migration tool in use (Prisma, Drizzle, Rails, Django, Alembic, Supabase migrations, plain SQL)
  2. Model entities and relationships. List entities, attributes, and cardinality (1:1, 1:N, N:M). Normalize to 3NF by default; denormalize only for a named query that needs it, and say which.

  3. Choose keys and types using references/postgres.md (or references/other-engines.md for MySQL, SQLite, MongoDB). Defaults for Postgres: bigint generated always as identity or uuid DEFAULT uuidv7() primary keys, text over varchar(n), timestamptz for every timestamp, numeric for money.

  4. Encode the rules as constraints. NOT NULL wherever a value is required, UNIQUE for natural keys, CHECK for ranges and allowed values, foreign keys with a deliberate ON DELETE choice for each. Data rules that live only in app code get broken by the next script or admin fix.

  5. Derive indexes from the queries in step 1, not from a checklist. For each query, name the index that serves it. Index every foreign key column you join or cascade on (Postgres does not do this automatically). Do not add an index a UNIQUE or primary key already provides.

  6. Write the deliverable: DDL, ERD, index rationale, and migrations with rollback, using references/schema-templates.md and the layout in references/output-format.md. Match the user's migration tool if they have one.

  7. Verify. If a database is available (local Postgres, Docker postgres:18, a Supabase branch), run the DDL, insert a few rows, and EXPLAIN the key queries to confirm the planned indexes are used. Otherwise, walk each query from step 1 against the schema by hand. Then check the list below.

Checks before delivering

  • Every query from step 1 is served by a stated index or is explained as a scan that is fine at the expected size.
  • Every foreign key has an explicit ON DELETE behavior and an index on the referencing column.
  • No timestamp without time zone; no floating point for money; no varchar(255) by habit.
  • updated_at actually updates: a DEFAULT now() only sets it on insert, so add a trigger or set it in the ORM.
  • Uniqueness that should ignore case (emails, usernames) is enforced case-insensitively.
  • Multi-tenant tables carry tenant_id (or org_id), include it in unique constraints and leading index columns, and have row-level security if the database is reachable from clients (always on Supabase).
  • Migrations that touch large existing tables avoid long locks (see migration safety in references/postgres.md).
  • Rollback scripts are real inverses, and destructive rollbacks (dropping a column with data) are called out.
Show full SKILL.md (288 more words)Show less

Worked example

Request: "Multi-tenant project tracker: orgs, users who can belong to several orgs, projects per org, tasks per project. The main screen lists a project's open tasks by due date."

  • Entities: orgs, users, org_members (N:M between users and orgs with a role), projects (N:1 org), tasks (N:1 project, optional assignee).
  • Key query: open tasks for one project ordered by due date, so a partial index ON tasks (project_id, due_at) WHERE status <> 'done'.
  • Rules as constraints: UNIQUE (org_id, user_id) on org_members; CHECK (role IN ('owner','admin','member')); status limited by CHECK; unique project name per org with UNIQUE (org_id, name).
  • Deletes: removing an org cascades to projects and tasks; deleting a user sets tasks.assignee_id to null instead of deleting tasks.
  • Tenancy: tasks carries org_id so row-level security can check membership without a join through projects, and a composite foreign key (project_id, org_id) -> projects (id, org_id) keeps the two consistent.

The full DDL for this example is in references/schema-templates.md.

Failure modes

  • Designing tables before knowing the queries, then indexing every column "just in case". Each index slows every write.
  • Postgres ENUM types for values that will change. Adding a value is easy, but removing or renaming one is painful; a CHECK constraint or lookup table is easier to evolve.
  • Soft deletes (deleted_at) added everywhere by default. They leak into every query and unique constraint. Use them where there is a real restore or audit need, and pair them with partial unique indexes.
  • Polymorphic foreign keys (commentable_type + commentable_id) that the database cannot enforce. Prefer separate nullable FKs with a CHECK that exactly one is set, or separate tables.
  • Storing structured, queried fields inside jsonb. JSON is for sparse or truly variable attributes; anything you filter, join, or constrain on deserves a column.

© OneWave-AI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in database-schema-designer of OneWave-AI/claude-skills.

  • SKILL.md
  • references/other-engines.md
  • references/output-format.md
  • references/postgres.md
  • references/schema-templates.md

Open the folder on GitHubat commit fc5b785

Compare with similar skills

Database Schema Designer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Database Schema Designer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Database Schema Designer this skillOneWave-AI/claude-skills328—~1.6kAutomated safety check: PassMIT
Database Expertcin12211/orca-q224—~2.8kAutomated safety check: PassMIT
Prisma Database Setupcurvenote/curvenote1703 repos~1.4kAutomated safety check: PassMIT
Prisma 8 Contract-First ORMprisma/orm48k—~3.8kAutomated safety check: NotesApache-2.0
Database Domain Specialistmodu-ai/moai-adk1.2k—~2.8kAutomated safety check: PassApache-2.0
Automating Database Backupsjeremylongshore/tons-of-skills-marketplace2.8k—~1.5kAutomated safety check: PassMIT

Similar skills

  • Database Expert

    cin12211/orca-q

    Database performance optimization, schema design, query analysis, and connection management across PostgreSQL, MySQL, MongoDB, and SQLite with ORM integration.

    224 GitHub stars~2.8k tokensUpdated 17 days ago
    DatabasesAuto-check passed
  • Prisma Database Setup

    curvenote/curvenote

    Guides for configuring Prisma with different database providers (PostgreSQL, MySQL, SQLite, MongoDB, etc.).

    170 GitHub starsUsed in 3 repos~1.4k tokens
    DatabasesAuto-check passed
  • Official

    Routes Prisma 8 tasks such as contracts, migrations, queries and upgrades to the right reference files for projects on the contract-first @prisma/orm packages.

    48k GitHub stars~3.8k tokensUpdated today
    DatabasesAuto-check: notes
  • Database guidance for PostgreSQL, MongoDB, Redis and Oracle plus Neon, Supabase and Firestore: schema design, indexing, query tuning and cloud database choice.

    1.2k GitHub stars~2.8k tokensUpdated today
    DatabasesAuto-check passed
  • Automating Database Backups

    jeremylongshore/tons-of-skills-marketplace

    Automate database backup processes with scheduling, compression, and encryption.

    2.8k GitHub stars~1.5k tokensUpdated today
    DatabasesAuto-check passed
  • Database Schema Designer

    borghei/Claude-Skills

    Design relational schemas from requirements with normalization, migrations, ERDs, RLS policies, and indexes for PostgreSQL, MySQL, and SQLite.

    886 GitHub stars~1.7k tokensUpdated yesterday
    DatabasesAuto-check passed

More from OneWave-AI/claude-skills

All 69 skills in this repo
  • CRM Data Cleanup

    OneWave-AI/claude-skills

    Finds duplicate and junk records in a CRM CSV export with fuzzy matching, normalizes fields and writes a reviewable merge plan plus import-ready files without touching the live CRM.

    328 GitHub stars~2.5k tokensUpdated 7 days ago
    Auto-check passed
  • Design Export Repair

    OneWave-AI/claude-skills

    Repairs broken decks and PDFs exported from Claude Design or similar AI deck generators: clipped text, wrong fonts and corrupted .pptx package structure.

    328 GitHub stars~2.6k tokensUpdated 7 days ago
    Auto-check passed
  • Bi Measure Builder

    OneWave-AI/claude-skills

    Writes, explains, debugs, and optimizes BI calculations - Power BI / Fabric DAX measures and calculated columns, Tableau calculated fields (FIXED/INCLUDE/EXCLUDE LOD expressions, table…

    328 GitHub stars~2.2k tokensUpdated 7 days ago
    Auto-check passed
  • Bookkeeping Close

    OneWave-AI/claude-skills

    Categorizes transactions, reconciles bank and card statements to the ledger, works a month-end checklist and prepares a close package, without ever forcing a balance.

    328 GitHub stars~2k tokensUpdated 7 days ago
    Auto-check passed
  • CSV and Excel Merger

    OneWave-AI/claude-skills

    Combines CSV, TSV and Excel files into one verified table with pandas, by stacking or joining, mapping columns, normalizing keys and removing duplicates.

    328 GitHub stars~1.6k tokensUpdated 7 days ago
    Auto-check passed
  • Sec Filing Puller

    OneWave-AI/claude-skills

    Pulls financial statement numbers for US public companies straight from SEC EDGAR's free official XBRL APIs (companyfacts, companyconcept, frames, submissions) into a cited table.

    328 GitHub stars~2.1k tokensUpdated 7 days ago
    Auto-check passed

Categories

Questions about Database Schema Designer

What does Database Schema Designer do?

Designs relational and document database schemas from requirements or an existing app - tables and collections, keys, relationships, constraints, indexes driven by real query patterns, ERDs, and…. Database Schema Designer is an agent skill from OneWave-AI/claude-skills. Designs relational and document database schemas from requirements or an existing app - tables and collections, keys, relationships, constraints, indexes driven by real query patterns, ERDs, and reversible migration scripts - with PostgreSQL (including Supabase) as the default and MySQL, SQLite, and MongoDB supported.

When should I use Database Schema Designer?

Database Schema Designer fits situations like: the user wants to model data for a new app; fix an existing schema; plan multi-tenancy; write CREATE TABLE statements.

How do I install Database Schema Designer in Claude Code?

Run `npx skills add OneWave-AI/claude-skills --skill database-schema-designer -a claude-code`. Or copy the skill folder (database-schema-designer in OneWave-AI/claude-skills) into .claude/skills/database-schema-designer in your project. Claude Code loads it when a task matches its description.

How do I install Database Schema Designer in Codex?

Run `npx skills add OneWave-AI/claude-skills --skill database-schema-designer -a codex`. Or copy the skill folder (database-schema-designer in OneWave-AI/claude-skills) into .agents/skills/database-schema-designer in your project. Codex loads it when a task matches its description.

Can I use Database Schema Designer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OneWave-AI/claude-skills --skill database-schema-designer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/database-schema-designer, .gemini/skills/database-schema-designer, .github/skills/database-schema-designer and .opencode/skills/database-schema-designer in your project.

What does Database Schema Designer need to run?

SKILL.md names no scripts, command-line tools or credentials: Database Schema Designer is instructions for the agent only. Our summary lists: Docker.

Does Database Schema Designer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Database Schema Designer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Database Schema Designer use?

Database Schema Designer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Database Schema Designer use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.9k tokens, read only when the agent opens those files.

What are the alternatives to Database Schema Designer?

Skills that share tags, products or a category with Database Schema Designer: Database Expert (cin12211/orca-q, 224 stars), Prisma Database Setup (curvenote/curvenote, 170 stars), Prisma 8 Contract-First ORM (prisma/orm, 48k stars) and Database Domain Specialist (modu-ai/moai-adk, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Database Schema Designer?

OneWave-AI (a GitHub organization) maintains it in OneWave-AI/claude-skills, which has 328 GitHub stars. The repository holds 69 skills in this directory. The repository was last updated on October 2, 2026.

Source: OneWave-AI/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.