Skip to content

Context-driven database design guidance covering schema, indexing, ORM choice, and serverless options.

CCM score
54 of 100
skills.sh installs
537
GitHub stars
34.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers database selection, ORM selection, schema design, indexing, query optimization, and migrations
  • Includes six reference files, each read on demand for choosing a database, choosing an ORM, or tuning performance
  • Requires asking for database preferences when unclear and avoids defaulting to PostgreSQL for every app
  • Designed for developers choosing between PostgreSQL, Neon, Turso, SQLite, Drizzle, Prisma, and Kysely

Install

$ npx -y skills add davila7/claude-code-templates --skill database-design -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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

Details

Repository
github.com/davila7/claude-code-templates
Category
Databases
First seen
Jun 3, 2026

More from davila7/claude-code-templates

All 398

Similar to Database Design

More Databases