Database Schema Architect skill for Claude and Codex
Takes a list of business entities and how they relate and returns a normalised relational design: an ER description, a table summary, and runnable CREATE…
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 a new relational schema must be designed from a list of business entities and relationships, with an ER description and runnable DDL. Do not use for writing DDL for tables whose columns are already fully specified, refactoring a live schema, or documenting an existing database. Related topics: coding, database.
What it will ask you for
- Database platform (choose one: MySQL, PostgreSQL, SQL Server, Oracle, SQLite)
- Core entities (longer free text)
- Relationships (longer free text)
- Primary key style (choose one: Auto-increment, UUID, Composite, Natural)
- Index strategy (choose any: Single-column, Composite, Full-text, Spatial, Minimal)
- Include audit columns (creation and update timestamps plus creator) (choose one: Yes, No)
- Expected scale (free text, e.g. "10k customers and 1M orders per year")
How it works
- Derive columns and native types for each entity from its stated facts, deciding nullability per column, so each table reaches third normal form.
- Resolve relationships: a junction table per many-to-many, the foreign key on the many side of each one-to-many, and the chosen primary key style applied throughout.
- Add indexes for foreign keys and implied lookups within the chosen strategy, dropping any the stated scale does not justify.
- Write the ER description and the table summary with purpose and row estimate per table.
- Emit CREATE TABLE statements in dependency order with constraints, indexes, and audit columns, and list every decision made on the user's behalf.
What you get
A Markdown document with a textual ER description, a table summary list, and one fenced sql block of CREATE TABLE statements in dependency order with keys, constraints, and indexes, followed by a list of design decisions.
What it watches out for
- Emitting tables in alphabetical order so a foreign key references a table that does not exist yet and the script fails halfway.
- Modelling a many-to-many with an array or comma-separated column instead of a junction table, which cannot be joined or indexed.
- Indexing every column on a small table, which slows writes for no read benefit.
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.