PluginBench
Skill
Pass
Audit score 90

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-design
Claude Code
Cursor
Windsurf
Cline

How to use database-design

  1. 1.Identify your deployment environment (serverless, traditional, edge)
  2. 2.Consult database-selection.md to compare options for your use case
  3. 3.Review schema-design.md to plan your data model and relationships
  4. 4.Choose an ORM using orm-selection.md based on your needs
  5. 5.Design indexes using indexing.md for expected query patterns
  6. 6.Plan migrations safely using migrations.md before deploying schema changes

Use cases

Good for
  • 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
Who it's for
  • 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

Should I always use PostgreSQL?

No. SQLite is often sufficient for simple apps, Turso for edge deployments, and Neon for serverless. Choose based on your specific context, not defaults.

What's the difference between Drizzle, Prisma, and Kysely?

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.

How do I avoid N+1 query problems?

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.

When should I add an index?

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.

Can I safely migrate schemas in production?

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.

FileDescriptionWhen to Read
database-selection.mdPostgreSQL vs Neon vs Turso vs SQLiteChoosing database
orm-selection.mdDrizzle vs Prisma vs KyselyChoosing ORM
schema-design.mdNormalization, PKs, relationshipsDesigning schema
indexing.mdIndex types, composite indexesPerformance tuning
optimization.mdN+1, EXPLAIN ANALYZEQuery optimization
migrations.mdSafe migrations, serverless DBsSchema 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.