This one cuts through the noise of blindly reaching for PostgreSQL every time. It walks you through database selection (PostgreSQL vs Neon vs Turso vs SQLite), ORM tradeoffs (Drizzle vs Prisma vs Kysely), schema design fundamentals, and indexing strategy. The focus is on context-driven decisions rather than cargo-culting patterns. Covers the essentials like avoiding N+1 queries, planning migrations for serverless databases, and knowing when SQLite is actually the right call. The "learn to think, not copy SQL patterns" framing is honest about what matters. Good for when you need to design a schema from scratch or evaluate whether your stack actually fits your deployment model.

skills.sh installs
531
GitHub stars
33.2K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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

Sponsors

Details

Repository
github.com/davila7/claude-code-templates
Categories
Backend & APIs, Productivity & Planning, Cloud & Infrastructure, Design & UI/UX, Databases
First seen
Jun 3, 2026

More from davila7/claude-code-templates

All 618
1secondsky avatarapi-rate-limitingsecondsky/claude-skillsImplements API rate limiting using token bucket, sliding window, and Redis-based algorithms to protect against abuse. Use when securing public APIs, implementin507skills.sh installs
2manutej avatarhasura-graphql-enginemanutej/luxor-claude-marketplaceComplete guide for Hasura GraphQL Engine including instant GraphQL APIs, permissions, authentication, event triggers, actions, and production deployment506skills.sh installs
3pluginagentmarketplace avatarmysqlpluginagentmarketplace/custom-plugin-sqlMySQL database administration and development506skills.sh installs
4yoanbernabeu avatarsupabase-audit-tables-listyoanbernabeu/supabase-pentest-skillsList all tables exposed via the Supabase PostgREST API to identify the attack surface.504skills.sh installs
5secondsky avatarbetter-authsecondsky/claude-skillsSkill for integrating Better Auth - comprehensive TypeScript authentication framework for Cloudflare D1, Next.js, Nuxt, and 15+ frameworks. Use when adding auth502skills.sh installs
6yoanbernabeu avatarsupabase-extract-anon-keyyoanbernabeu/supabase-pentest-skillsExtract the Supabase anon/public API key from client-side code. This key is expected in client apps but important for RLS testing.501skills.sh installs