database-design
Designs database schemas, indexing strategies, query optimization, and migration patterns for SQL and NoSQL databases. Use when designing tables, optimizing queries, fixing N+1 problems, planning migrations, or when asked about database performance, normalization, ORMs, or data modeling.
npx skills add CloudAI-X/claude-workflow-v2 --skill database-design --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Database Design ### When to Load - **Trigger**: Schema design, migrations, query optimization, indexing strategies, data modeling, N+1 fixes - **Skip**: No database work involved in the current task ## Database Design Workflow Copy this checklist and track progress: ``` Database Design Progress: - [ ] Step 1: Identify entities and relationships - [ ] Step 2: Normalize schema (3NF minimum) - [ ] Step 3: Evaluate denormalization needs - [ ] Step 4: Design indexes for query patterns - [ ] Step 5: Write and optimize critical queries - [ ] Step 6: Plan migration strategy - [ ] Step 7: Configure connection pooling - [ ] Step 8: Validate against anti-patterns checklist ``` ## Schema Design Principles ### Normalization Forms ``` 1NF: Atomic values, no repeating groups 2NF: 1NF + no partial dependencies (all non-key columns depend on full PK) 3NF: 2NF + no transitive dependencies (non-key columns don't depend on other non-key columns) ``` ```sql -- WRONG: Unnormalized CREATE TABLE orders ( id SERIAL PRIMARY KEY, customer_name TEXT, customer_email TEXT, -- duplicated across orders product1_name TEXT, -- repeating groups product1_qty INT, product2_name TEXT, product2_qty INT ); -- CORRECT:
- When to Load
- Database Design Workflow
- Schema Design Principles
- Normalization Forms
- When to Denormalize
- Indexing Strategy
- Index Types and When to Use
- Composite Indexes
- Partial and Covering Indexes
- Index Anti-patterns
- Query Optimization
- Reading EXPLAIN Plans
- N+1 Query Detection and Prevention
- Pagination
What does the database-design skill do?
Designs database schemas, indexing strategies, query optimization, and migration patterns for SQL and NoSQL databases. Use when designing tables, optimizing queries, fixing N+1 problems, planning migrations, or when asked about database performance, normalization, ORMs, or data modeling.
How do I install it?
Run `npx skills add CloudAI-X/claude-workflow-v2 --skill database-design --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From CloudAI-X/claude-workflow-v2, a repository with 1,397 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
