database-design
sickn33/agentic-awesome-skills
Design databases thoughtfully—choose the right database, schema, and ORM for your context.
What is database-design?
This skill guides database design decisions: selecting between PostgreSQL, SQLite, Neon, Turso, and other databases; designing normalized schemas; choosing ORMs like Drizzle, Prisma, or Kysely; and optimizing with indexing and query analysis. Use it when architecting a new database or refactoring an existing one.
- Compare databases (PostgreSQL, SQLite, Neon, Turso) and choose based on deployment context
- Design normalized schemas with primary keys, relationships, and constraints
- Select and configure appropriate ORMs (Drizzle, Prisma, Kysely)
- Plan indexing strategies including composite indexes for performance
- Identify and fix N+1 queries and other optimization anti-patterns
- Execute safe schema migrations in serverless and traditional environments
How to install database-design
npx skills add https://github.com/sickn33/agentic-awesome-skills --skill database-designHow to use database-design
- 1.Identify your deployment environment (serverless, traditional, edge)
- 2.Consult database-selection.md to compare options for your use case
- 3.Review schema-design.md to plan your data model and relationships
- 4.Choose an ORM using orm-selection.md based on your needs
- 5.Design indexes using indexing.md for expected query patterns
- 6.Plan migrations safely using migrations.md before deploying schema changes
Use cases
- Choosing between SQLite and PostgreSQL for a new application
- Designing a relational schema for an e-commerce platform
- Selecting an ORM that fits your project's type safety and migration needs
- Optimizing slow queries using EXPLAIN ANALYZE and indexing
- Planning zero-downtime migrations in production databases
- Backend engineers building new applications
- Full-stack developers choosing database technology
- DevOps engineers managing database deployments
- Teams migrating from one database or ORM to another
database-design FAQ
No. SQLite is often sufficient for simple apps, Turso for edge deployments, and Neon for serverless. Choose based on your specific context, not defaults.
Drizzle offers lightweight, type-safe SQL; Prisma provides a high-level schema and auto-migrations; Kysely focuses on query builder flexibility. Pick based on your preference for abstraction level and migration strategy.
Use JOIN queries or batch loading instead of fetching a parent then looping to fetch children. Consult optimization.md for patterns and EXPLAIN ANALYZE to verify.
Index columns used in WHERE, JOIN, and ORDER BY clauses. Use composite indexes for multi-column filters. Always test with EXPLAIN ANALYZE before and after.
Yes, with careful planning. Use migrations.md strategies: add columns as nullable, backfill data, then add constraints. Avoid locking operations on large tables.
Full instructions (SKILL.md)
Source of truth, from sickn33/agentic-awesome-skills.
name: database-design description: "Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases." risk: safe source: community date_added: "2026-02-27"
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 to Use
This skill is applicable to execute the workflow or actions described in the overview.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Related skills
More from sickn33/agentic-awesome-skills and the wider catalog.

discord-bot-architect
Build production-ready Discord bots with Discord.js and Pycord, including slash commands, components, and sharding.

docker-expert
Advanced Docker containerization expert for optimization, security, multi-stage builds, and production deployment.

documentation-templates
Ready-to-use documentation templates for READMEs, APIs, code comments, and AI-friendly docs.

firebase
Complete backend platform with auth, database, storage, functions, and hosting—optimize for denormalized queries and watch your costs.

frontend-design
Design and implement distinctive, high-craft frontends within brand, accessibility, and performance constraints.

frontend-dev-guidelines
Senior frontend engineering standards for scalable React apps with Suspense-first data fetching and strict TypeScript discipline.