drizzle-orm
Installation
SKILL.md
Drizzle ORM Guidelines
Reference Repositories
- Drizzle ORM — TypeScript ORM with SQL-like query builder
- Turso — Edge-hosted LibSQL database (Epicenter's database)
When to Apply This Skill
Use this pattern when you need to:
- Define Drizzle columns that use branded TypeScript string types.
- Choose between
$type<T>()andcustomTypefor column definitions. - Remove identity
toDriver/fromDriverconversions that add runtime overhead. - Keep data serialized through the storage layer and parse at UI edges.
Use $type() for Branded Strings, Not customType
When you need a column with a branded TypeScript type but no actual data transformation, use $type<T>() instead of customType.