database-design
Guides database schema design, indexing strategies, and ORM selection based on project context.
Install
mkdir -p .claude/skills/database-design && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/755" && unzip -o skill.zip -d .claude/skills/database-design && rm skill.zipInstalls to .claude/skills/database-design
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.Key capabilities
- →Design database schemas
- →Recommend indexing strategies
- →Evaluate ORM choices
- →Analyze data normalization needs
How it works
The skill evaluates data requirements against design principles to recommend schemas, indexes, and ORMs based on the specific deployment context.
Inputs & outputs
When to use database-design
- →Design a database schema
- →Choose the right ORM for a project
- →Optimize database indexing strategy
About this skill
Database Design
Learn to THINK, not copy SQL patterns.
🎯 Selective Reading Rule
Read ONLY files relevant to the request! Check the content map, find what you need.
| File | Description | When to Read |
|---|---|---|
database-selection.md | PostgreSQL vs Neon vs Turso vs SQLite | Choosing database |
orm-selection.md | Drizzle vs Prisma vs Kysely | Choosing ORM |
schema-design.md | Normalization, PKs, relationships | Designing schema |
indexing.md | Index types, composite indexes | Performance tuning |
optimization.md | N+1, EXPLAIN ANALYZE | Query optimization |
migrations.md | Safe migrations, serverless DBs | Schema changes |
⚠️ Core Principle
- ASK user for database preferences when unclear
- Choose database/ORM based on CONTEXT
- Don't default to PostgreSQL for everything
Decision Checklist
Before designing schema:
- Asked user about database preference?
- Chosen database for THIS context?
- Considered deployment environment?
- Planned index strategy?
- Defined relationship types?
Anti-Patterns
❌ Default to PostgreSQL for simple apps (SQLite may suffice) ❌ Skip indexing ❌ Use SELECT * in production ❌ Store JSON when structured data is better ❌ Ignore N+1 queries
When not to use it
- →When the database choice is already fixed by infrastructure constraints
- →When the application is too simple to require design planning
Prerequisites
Limitations
- →Requires user input on database preferences
- →Must consider deployment environment constraints
How it compares
It focuses on teaching design thinking and preventing anti-patterns rather than just generating SQL code.
Compared to similar skills
database-design side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| database-design (this skill) | 6 | 6mo | Review | Intermediate |
| database-schema-designer | 6 | 6mo | No flags | Intermediate |
| database-specialist | 0 | 5mo | No flags | Advanced |
| databases | 1 | 9mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by davila7
View all by davila7 →You might also like
database-schema-designer
davila7
Design robust, scalable database schemas for SQL and NoSQL databases. Provides normalization guidelines, indexing strategies, migration patterns, constraint design, and performance optimization. Ensures data integrity, query performance, and maintainable data models.
database-specialist
FelipeArruda
Use this skill when the task centers on database design or behavior: schema modeling, SQL, indexes, constraints, migrations, query tuning, data integrity, transactional logic, or tradeoffs across engines such as SQLite, PostgreSQL, and MySQL.
databases
mrgoonie
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.
schema-designer
clidey
Help design database schemas, create tables, and plan data models. Activates when users ask to create tables, design schemas, or model data relationships.
managing-database-sharding
jeremylongshore
Process use when you need to work with database sharding. This skill provides horizontal sharding strategies with comprehensive guidance and automation. Trigger with phrases like "implement sharding", "shard database", or "distribute data".
database-schema
alinaqi
Schema awareness - read before coding, type generation, prevent column errors