Database Schema Builder skill for Claude and Codex
Converts fully specified tables, columns, and relationships into exact, dialect-correct SQL DDL, so a design agreed on paper becomes a script that runs first…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when tables, columns, keys, and relationships are already decided and the user wants exact CREATE TABLE and CREATE INDEX statements for one SQL dialect. Do not use for deciding what tables or columns a system needs, migrating an existing schema, or generating ORM model classes. Related topics: coding, database.
What it will ask you for
- Database system (choose one: MySQL, PostgreSQL, SQLite, SQL Server, Oracle)
- Entities (tables) (longer free text)
- Attributes per entity (longer free text)
- Primary key style (choose one: Auto-increment, UUID, Composite, Natural)
- Relationships (longer free text)
- Indexes (longer free text)
- Naming convention (choose one: snake_case, camelCase, PascalCase, Keep as given)
How it works
- Map every specified column type to the dialect's native type and apply the naming convention to all identifiers.
- Implement the primary key style with the dialect's mechanism and create a junction table for each many-to-many.
- Flag any relationship, type, or key that cannot be built as written, instead of silently changing the specification.
- Order the CREATE TABLE statements by dependency, then the CREATE INDEX statements, and confirm the script runs top to bottom.
- Write the summary table (table, column count, primary key, foreign keys) and the list of flagged items.
What you get
A Markdown document with a summary table, then fenced sql blocks for CREATE TABLE statements in dependency order and CREATE INDEX statements, then a bullet list of flagged specification problems.
What it watches out for
- Adding helpful columns the specification did not list, which breaks the agreement the spec represents.
- Using a type that exists in one dialect but not the target, such as SERIAL on MySQL or DATETIME2 on PostgreSQL.
- Declaring foreign keys to tables created later in the script, so the first run fails.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.