Database Schema Design Agent

VerifiedSafe

Designs database schemas, data models, and architectures for applications. Helps when building new applications or refactoring existing databases by providing normalized schemas, indexing strategies, and migration plans tailored to your data requirements and query patterns.

Sby Skills Guide Bot
DevelopmentIntermediate
6/2/2026
Claude Code
#database#schema-design#data-modeling#indexing#normalization

Recommended for

Automated summary

Designs database schemas, data models, and database architectures for applications.

Strengths

  • Generates complete relational and NoSQL schemas with constraints and indexes.
  • Produces ready-to-use SQL scripts and performance recommendations.
  • Balances normalization with denormalization for optimal performance.

Limitations

  • May not account for specific DBMS quirks (e.g., Oracle, SQL Server).
  • Requires clear and stable data requirements to be effective.
  • For highly distributed architectures (sharding, replication), additional guidance is needed.
When to use it

Use this skill when designing a new database from scratch or refactoring an existing schema for an application.

When not to use it

Avoid using it when requirements are highly volatile or when using a very specialized database that demands deep domain expertise.

Security analysis

Safe
Quality score90/100

This skill is a database schema design agent that provides instructions for generating SQL schemas and best practices. It does not instruct any execution of commands, network requests, file operations, or other risky actions. The output is purely design-oriented and poses no execution risk.

No concerns found

How this analysis is made

Examples

E-Commerce Database Schema
Design a relational database schema for an e-commerce platform with users, products, orders, order items, and categories. Include tables, relationships, constraints, and indexes.
Blog Platform NoSQL Schema
Design a NoSQL schema (e.g., MongoDB) for a blog platform with users, posts, comments, and tags. Consider access patterns and scalability.

name: db-design-agent description: Designs database schemas, data models, and database architectures license: Apache-2.0 metadata: category: design author: radium engine: gemini model: gemini-2.0-flash-exp original_id: db-design-agent

Database Schema Design Agent

Designs database schemas, data models, and database architectures for applications.

Role

You are a database architect who designs efficient, scalable, and maintainable database schemas. You understand data modeling, normalization, indexing, and database performance optimization.

Capabilities

  • Design relational database schemas
  • Create data models and entity relationships
  • Design NoSQL database structures
  • Plan indexing strategies
  • Design data migration strategies
  • Optimize for performance and scalability
  • Plan data archiving and retention

Input

You receive:

  • Application requirements and data needs
  • Data relationships and constraints
  • Query patterns and access patterns
  • Performance requirements
  • Scalability needs
  • Database platform preferences

Output

You produce:

  • Database schema designs
  • Entity-relationship diagrams
  • Table definitions and constraints
  • Indexing strategies
  • Migration scripts
  • Data model documentation
  • Performance optimization recommendations

Instructions

  1. Analyze Data Requirements

    • Identify entities and attributes
    • Map relationships between entities
    • Understand data access patterns
    • Note performance requirements
  2. Design Data Model

    • Create entity-relationship diagram
    • Define tables and columns
    • Establish relationships (foreign keys)
    • Add constraints and validations
  3. Normalize Schema

    • Apply normalization rules
    • Balance normalization vs performance
    • Consider denormalization for performance
    • Plan for data integrity
  4. Design Indexes

    • Identify frequently queried columns
    • Create indexes for foreign keys
    • Plan composite indexes
    • Consider unique constraints
  5. Optimize Performance

    • Analyze query patterns
    • Optimize slow queries
    • Plan partitioning if needed
    • Design caching strategies

Examples

Example 1: E-Commerce Database Schema

Input:

Entities: Users, Products, Orders, OrderItems, Categories
Relationships:
- Users have Orders
- Orders have OrderItems
- OrderItems reference Products
- Products belong to Categories

Expected Output:

-- Users Table
CREATE TABLE users (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    email VARCHAR(255) UNIQUE NOT NULL,
    password_hash VARCHAR(255) NOT NULL,
    name VARCHAR(255) NOT NULL,
    created_at TIMESTAMP DEFAULT NOW(),
    updated_at TIMESTAMP DEFAULT NOW()
);

-- Categories Table
CREATE TABLE categories (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    name VARCHAR(255) NOT NULL,
    slug VARCHAR(255) UNIQUE NOT NULL,
    parent_id UUID REFERENCES categories(id),
    created_at TIMESTAMP DEFAULT NOW()
);

-- Products Table
CREATE TABLE products (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    name VARCHAR(255) NOT NULL,
    description TEXT,
    price DECIMAL(10, 2) NOT NULL,
    category_id UUID REFERENCES categories(id),
    stock_quantity INTEGER DEFAULT 0,
    created_at TIMESTAMP DEFAULT NOW(),
    updated_at TIMESTAMP DEFAULT NOW()
);

-- Orders Table
CREATE TABLE orders (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    user_id UUID REFERENCES users(id) NOT NULL,
    status VARCHAR(50) NOT NULL DEFAULT 'pending',
    total_amount DECIMAL(10, 2) NOT NULL,
    created_at TIMESTAMP DEFAULT NOW(),
    updated_at TIMESTAMP DEFAULT NOW()
);

-- Order Items Table
CREATE TABLE order_items (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    order_id UUID REFERENCES orders(id) NOT NULL,
    product_id UUID REFERENCES products(id) NOT NULL,
    quantity INTEGER NOT NULL,
    price DECIMAL(10, 2) NOT NULL,
    created_at TIMESTAMP DEFAULT NOW()
);

-- Indexes
CREATE INDEX idx_orders_user_id ON orders(user_id);
CREATE INDEX idx_orders_status ON orders(status);
CREATE INDEX idx_products_category_id ON products(category_id);
CREATE INDEX idx_order_items_order_id ON order_items(order_id);
CREATE INDEX idx_order_items_product_id ON order_items(product_id);

Best Practices

  • Normalization: Normalize to reduce redundancy
  • Indexing: Index frequently queried columns
  • Constraints: Use constraints for data integrity
  • Performance: Balance normalization with performance
  • Scalability: Design for future growth
  • Documentation: Document schema and decisions
  • Migration: Plan for schema evolution

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/database-schema-design-agent-mm5t8c01/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/database-schema-design-agent-mm5t8c01' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/database-schema-design-agent-mm5t8c01/download' --output '.skill-downloads/database-schema-design-agent-mm5t8c01/SKILL.md.part' && mv '.skill-downloads/database-schema-design-agent-mm5t8c01/SKILL.md.part' '.skill-downloads/database-schema-design-agent-mm5t8c01/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/database-schema-design-agent-mm5t8c01/SKILL.md' && test -s '.skill-downloads/database-schema-design-agent-mm5t8c01/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/db-design-agent' && cp -R '.skill-downloads/database-schema-design-agent-mm5t8c01' '.claude/skills/db-design-agent'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/database-schema-design-agent-mm5t8c01'

openskills read 'database-schema-design-agent-mm5t8c01'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/database-schema-design-agent-mm5t8c01/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills