db-schema-docs
Installation
SKILL.md
DB Schema Docs
The source of truth is src/lib/db.ts.
When the schema changes:
- Update
src/lib/db.tsand any migrations first. - Run
bun run docs:db-schema. - Review
docs/database-schema.mdfor:- table columns, defaults, and keys
- indexes, including partial indexes
- foreign keys
- Mermaid ERD relationships
- Run
bun run docs:db-schema:checkbefore finishing. - Keep the schema, migration, and doc updates in the same change.
Use this skill when the user asks for a table list, index list, or Mermaid diagram of the SQL schema.