database-design

Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.

Best use case

database-design is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.

Teams using database-design should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/database-design/SKILL.md --create-dirs "https://raw.githubusercontent.com/ratnesh-maurya/cursor-claude-personas/main/ai-ml-engineer/.claude/skills/database-design/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/database-design/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How database-design Compares

Feature / Agentdatabase-designStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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.

Related Skills

product-design

5
from ratnesh-maurya/cursor-claude-personas

Design de produto nivel Apple — sistemas visuais, UX flows, acessibilidade, linguagem visual proprietaria, design tokens, prototipagem e handoff. Cobre Figma, design systems, tipografia, cor,...

kpi-dashboard-design

5
from ratnesh-maurya/cursor-claude-personas

Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use when building business dashboards, selecting metrics, or designing data ...

design-spells

5
from ratnesh-maurya/cursor-claude-personas

Curated micro-interactions and design details that add "magic" and personality to websites and apps.

design-orchestration

5
from ratnesh-maurya/cursor-claude-personas

Orchestrates design workflows by routing work through brainstorming, multi-agent review, and execution readiness in the correct order.

design-md

5
from ratnesh-maurya/cursor-claude-personas

Analyze Stitch projects and synthesize a semantic design system into DESIGN.md files

antigravity-design-expert

5
from ratnesh-maurya/cursor-claude-personas

Core UI/UX engineering skill for building highly interactive, spatial, weightless, and glassmorphism-based web interfaces using GSAP and 3D CSS.

domain-driven-design

5
from ratnesh-maurya/cursor-claude-personas

Plan and route Domain-Driven Design work from strategic modeling to tactical implementation and evented architecture patterns.

ddd-strategic-design

5
from ratnesh-maurya/cursor-claude-personas

Design DDD strategic artifacts including subdomains, bounded contexts, and ubiquitous language for complex business domains.

database-migrations-sql-migrations

5
from ratnesh-maurya/cursor-claude-personas

SQL database migrations with zero-downtime strategies for PostgreSQL, MySQL, and SQL Server. Focus on data integrity and rollback plans.

database-migrations-migration-observability

5
from ratnesh-maurya/cursor-claude-personas

Migration monitoring, CDC, and observability infrastructure

ui-ux-designer

5
from ratnesh-maurya/cursor-claude-personas

Create interface designs, wireframes, and design systems. Masters user research, accessibility standards, and modern design tools.

tailwind-design-system

5
from ratnesh-maurya/cursor-claude-personas

Build scalable design systems with Tailwind CSS, design tokens, component libraries, and responsive patterns. Use when creating component libraries, implementing design systems, or standardizing UI...