Agent skill · Databases

database-design

Database schema design, optimization, and migration patterns for PostgreSQL, MySQL, and NoSQL databases. Use for designing schemas, writing migrations, or optimizing queries.

MoizIbnYousafgithub.com/MoizIbnYousafGitHub ↗
claude-codecodexcursorMIT
Install
npx skills add MoizIbnYousaf/Ai-Agent-Skills --skill database-design --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 5 KB
Bundled scripts: none
Version: 4.1.0
Path: skills/database-design/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,114
Language: JavaScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Database Design ## Schema Design Principles ### Normalization Guidelines ```sql -- 1NF: Atomic values, no repeating groups -- 2NF: No partial dependencies on composite keys -- 3NF: No transitive dependencies -- Users table (normalized) CREATE TABLE users ( id SERIAL PRIMARY KEY, email VARCHAR(255) UNIQUE NOT NULL, created_at TIMESTAMPTZ DEFAULT NOW() ); -- Addresses table (separate entity) CREATE TABLE addresses ( id SERIAL PRIMARY KEY, user_id INTEGER REFERENCES users(id) ON DELETE CASCADE, street VARCHAR(255), city VARCHAR(100), country VARCHAR(100), is_primary BOOLEAN DEFAULT false ); ``` ### Denormalization for Performance ```sql -- When read performance matters more than write consistency CREATE TABLE order_summaries ( id SERIAL PRIMARY KEY, order_id INTEGER REFERENCES orders(id), customer_name VARCHAR(255), -- Denormalized from customers total_amount DECIMAL(10,2), item_count INTEGER, last_updated TIMESTAMPTZ DEFAULT NOW() ); ``` ## Index Design ### Common Index Patterns ```sql -- B-tree (default) for equality and range queries CREATE INDEX idx_users_email ON users(email); -- Composite index (order matters!) CREATE INDEX idx_orders_user_date ON orders(user_id, created_at DE

What's inside
Steps it walks through
  1. Schema Design Principles
  2. Normalization Guidelines
  3. Denormalization for Performance
  4. Index Design
  5. Common Index Patterns
  6. Index Analysis
  7. Migration Patterns
  8. Safe Migration Template
  9. Zero-Downtime Migrations
  10. Query Optimization
  11. EXPLAIN Analysis
  12. Common Optimizations
  13. Constraints & Data Integrity
  14. Best Practices
More from Ai-Agent-Skills
All skills →
About this skill
What does the database-design skill do?

Database schema design, optimization, and migration patterns for PostgreSQL, MySQL, and NoSQL databases. Use for designing schemas, writing migrations, or optimizing queries.

How do I install it?

Run `npx skills add MoizIbnYousaf/Ai-Agent-Skills --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 MoizIbnYousaf/Ai-Agent-Skills, a repository with 1,114 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.

Keep going