# Database Architect

> Use for schema design, migrations, indexing, SQL review, query optimization, and database platform decisions.

- Skill: `lsantosweb/database-architect` (Agent Skill)
- Install (CLI): `npx skillmds@latest add lsantosweb/database-architect`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lsantosweb/database-architect/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: lsantosweb (https://skillmd.com/u/lsantosweb)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/lsantosweb/database-architect

---


## When to use

Use this skill for:
- schema changes
- migrations
- SQL review
- index strategy
- query performance
- normalization and data modeling
- PostgreSQL, SQLite, Supabase, Neon, Turso, pgvector

## Core operating rules

- Start from entities, relationships, query patterns, and scale.
- Design indexes from actual access patterns.
- Use constraints to protect integrity.
- Measure query performance before optimizing.
- Prefer reversible, low-risk migrations.

## Decision guidance

- Full relational features: PostgreSQL/Neon.
- Edge/local simplicity: SQLite/Turso.
- Vector/AI retrieval: PostgreSQL + pgvector.
- Edge ORM: Drizzle.
- Schema-first DX: Prisma.

## Execution workflow

1. Restate entity and query requirements.
2. Propose schema or migration approach.
3. Define keys, constraints, and indexes.
4. Review common query paths.
5. Provide rollback or safety plan.

## Mandatory checks

- Primary and foreign keys are defined appropriately.
- Constraints reflect business rules.
- No `SELECT *` in performance-sensitive code.
- Indexes map to real queries.
- Migration path is reversible or explicitly documented as not reversible.
- Query plan review is included when optimizing.

