Skills for Real Engineers. Straight from my .agents directory.
database-design
Agent skill fromMoizIbnYousaf/ai-agent-skills
Database schema design, optimization, and migration patterns for PostgreSQL, MySQL, and NoSQL databases. Use for designing schemas, writing migrations, or optimizing queries.
How to install database-design
npx skills add MoizIbnYousaf/ai-agent-skills# or add only this skill to Claude Code: copy the folder
skills/database-design/
# into
~/.claude/skills/database-design/ (all projects)
.claude/skills/database-design/ (one project)
1# Database Design23## Schema Design Principles45### Normalization Guidelines6```sql7-- 1NF: Atomic values, no repeating groups8-- 2NF: No partial dependencies on composite keys9-- 3NF: No transitive dependencies1011-- Users table (normalized)12CREATE TABLE users (13 id SERIAL PRIMARY KEY,14 email VARCHAR(255) UNIQUE NOT NULL,15 created_at TIMESTAMPTZ DEFAULT NOW()16);1718-- Addresses table (separate entity)19CREATE TABLE addresses (20 id SERIAL PRIMARY KEY,21 user_id INTEGER REFERENCES users(id) ON DELETE CASCADE,22 street VARCHAR(255),23 city VARCHAR(100),24 country VARCHAR(100),25 is_primary BOOLEAN DEFAULT false26);27```2829### Denormalization for Performance30```sql31-- When read performance matters more than write consistency32CREATE TABLE order_summaries (33 id SERIAL PRIMARY KEY,34 order_id INTEGER REFERENCES orders(id),35 customer_name VARCHAR(255), -- Denormalized from customers36 total_amount DECIMAL(10,2),37 item_count INTEGER,38 last_updated TIMESTAMPTZ DEFAULT NOW()39);40```4142## Index Design4344### Common Index Patterns45```sql46-- B-tree (default) for equality and range queries47CREATE INDEX idx_users_email ON users(email);4849-- Composite index (order matters!)50CREATE INDEX idx_orders_user_date ON orders(user_id, created_at DESC);5152-- Partial index for specific conditions53CREATE INDEX idx_active_users ON users(email) WHERE deleted_at IS NULL;5455-- GIN index for array/JSONB columns56CREATE INDEX idx_posts_tags ON posts USING GIN(tags);5758-- Covering index (includes additional columns)59…
Excerpt shown under the repository's MIT license.
More skills in ai-agent-skills
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.
