design/database-design/SKILL.md
Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.
npx skillsauth add caobingsheng/skills database-designInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Learn to THINK, not copy SQL patterns.
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 |
Before designing schema:
❌ 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
This skill is applicable to execute the workflow or actions described in the overview.
development
Use when working with tdd workflows tdd refactor
testing
Generate failing tests for the TDD red phase to define expected behavior and edge cases.
development
Implement the minimal code needed to make failing tests pass in the TDD green phase.
tools
Use when working with tdd workflows tdd cycle