database-schema

Design a database schema

16 stars

Best use case

database-schema is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Design a database schema

Teams using database-schema should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/database-schema/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/database-schema/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/database-schema/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How database-schema Compares

Feature / Agentdatabase-schemaStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Design a database schema

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Database Schema Design

Help me design a database schema:

## Requirements

1. **What are we storing?** Describe the data.
2. **Relationships**: How do entities relate?
3. **Access patterns**: How will data be queried?
4. **Scale**: Expected data volume?
5. **Database**: PostgreSQL, MySQL, MongoDB, etc.?

## Entity Design

For each entity, define:

### Table Structure

- Table name (plural, snake_case)
- Columns with types
- Primary key
- Timestamps (created_at, updated_at)
- Soft delete (deleted_at) if needed

### Constraints

- NOT NULL where required
- UNIQUE constraints
- CHECK constraints for validation
- DEFAULT values

### Relationships

- Foreign keys
- ON DELETE behavior
- Junction tables for many-to-many

### Indexes

- Primary key index
- Foreign key indexes
- Query-specific indexes
- Composite indexes where needed

## Schema Generation

Generate:

1. CREATE TABLE statements
2. Index creation
3. RLS policies (if using Supabase)
4. Sample seed data

## Optimization Review

Check for:

- Normalization level appropriate
- Index strategy sound
- Query patterns supported
- Future scaling considerations

Generate the complete schema with comments explaining decisions.

Related Skills

designing-databases

16
from diegosouzapw/awesome-omni-skill

データベーススキーマ設計と最適化を支援します。正規化戦略、インデックス設計、パフォーマンス最適化を提供します。データモデル設計、データベース構造の最適化が必要な場合に使用してください。

databases

16
from diegosouzapw/awesome-omni-skill

Work with MongoDB (document database, BSON documents, aggregation pipelines, Atlas cloud) and PostgreSQL (relational database, SQL queries, psql CLI, pgAdmin). Use when designing database schemas, writing queries and aggregations, optimizing indexes for performance, performing database migrations, configuring replication and sharding, implementing backup and restore strategies, managing database users and permissions, analyzing query performance, or administering production databases.

databases-architecture-skill

16
from diegosouzapw/awesome-omni-skill

Master database design (SQL, NoSQL), system architecture, API design (REST, GraphQL), and building scalable systems. Learn PostgreSQL, MongoDB, system design patterns, and enterprise architectures.

database-workflow

16
from diegosouzapw/awesome-omni-skill

Language-agnostic database best practices covering migrations, schema design, ORM patterns, query optimization, and testing strategies. Activate when working with database files, migrations, schema changes, SQL, ORM code, database tests, or when user mentions migrations, schema design, SQL optimization, NoSQL, database patterns, or connection pooling.

database-schema-design

16
from diegosouzapw/awesome-omni-skill

Design and optimize database schemas for SQL and NoSQL databases. Use when creating new databases, designing tables, defining relationships, indexing strategies, or database migrations. Handles PostgreSQL, MySQL, MongoDB, normalization, and performance optimization.

ClaudeChatGPTGemini

database

16
from diegosouzapw/awesome-omni-skill

ทำงานกับ PostgreSQL และ MongoDB อย่างมีประสิทธิภาพ

database-query

16
from diegosouzapw/awesome-omni-skill

Natural language database queries with multi-database support, query optimization, and visual results

database-patterns

16
from diegosouzapw/awesome-omni-skill

Use when designing database schemas, implementing repository patterns, writing optimized queries, managing migrations, or working with indexes and transactions for SQL/NoSQL databases.

database-optimizer

16
from diegosouzapw/awesome-omni-skill

Expert database optimizer specializing in modern performance tuning, query optimization, and scalable architectures. Masters advanced indexing, N+1 resolution, multi-tier caching, partitioning strategies, and cloud database optimization. Handles complex query analysis, migration strategies, and performance monitoring. Use PROACTIVELY for database optimization, performance issues, or scalability challenges.

database-optimization

16
from diegosouzapw/awesome-omni-skill

Use when optimizing database queries, indexes, N+1 problems, slow queries, or analyzing query performance. Triggers on keywords like "slow query", "N+1", "index", "query optimization", "database performance", "eager loading".

database-migrator

16
from diegosouzapw/awesome-omni-skill

Handle schema changes and data migrations safely. Creates migration files with rollback plans. Use when user says 'migration', 'schema change', 'add column', 'database change', or 'alter table'.

database-migrations-sql-migrations

16
from diegosouzapw/awesome-omni-skill

SQL database migrations with zero-downtime strategies for PostgreSQL, MySQL, SQL Server Use when: the user asks to run the `sql-migrations` workflow and the task requires multi-step orchestration. Do not use when: the task is small, single-step, and can be completed directly without orchestration overhead.