Database Agent Skill
Schema normalization, indexing strategy, and migration patterns.
The Skill
Full content, every format. Copy it, download it, or install with one command.
---
description: Schema normalization, indexing strategy, and migration patterns.
homepage: https://yepapi.com/skills/database
metadata:
tags: [database, schema, migrations, indexing]
---
# Database Design
## Rules
- Normalize to 3NF by default — denormalize only for measured performance needs
- Index strategy: primary keys (auto), foreign keys, frequently filtered/sorted columns
- Migrations: version-controlled, up + down, descriptive names
- Seed data for development — realistic test data, not `foo/bar`
- Soft deletes (`deletedAt`) for user-facing records — hard delete for truly ephemeral data
- UUIDs for public-facing IDs — auto-increment integers for internal relations
- Connection pooling for serverless — PgBouncer, Prisma Accelerate, or Supabase pooler
- Backup strategy: automated daily backups, test restore process
- Query optimization: `EXPLAIN ANALYZE`, avoid `SELECT *`, use specific columnsInstall
Why Use the Database Skill?
Without this skill, your AI guesses at database patterns. It might hallucinate deprecated APIs, use outdated conventions, or miss best practices entirely. With it, your AI follows a proven ruleset — every suggestion aligns with current standards.
Drop this skill into your project and your AI instantly knows the rules. Better code suggestions, fewer errors, faster shipping.
Try These Prompts
These prompts work better with the Database skill installed. Your AI knows the context and writes code that fits.
"Design a normalized database schema with proper indexes and foreign key constraints"
"Create migration scripts that safely alter tables without downtime"
"Build a database layer with connection pooling, query logging, and automatic retries"
Works Great With
Database skill — FAQ
It enforces schema normalization, indexing strategies, and migration patterns. Your AI designs database schemas with proper constraints, indexes, and migration scripts that avoid downtime.
Run `npx skills add YepAPI/skills --skill database` in your project root. This copies the skill file into your repo where your AI coding tool can read it automatically.
The skill works with both but recommends Prisma for type safety and migration management. For complex queries, it includes patterns for dropping down to raw SQL while maintaining type safety.