Agent Skills
› vudovn/ag-kit
› database-design
database-design
GitHub提供数据库设计原则与决策支持,涵盖选型、模式设计、索引策略及ORM选择。指导根据上下文选择合适技术栈,避免常见反模式,确保架构合理性。
Trigger Scenarios
需要设计数据库表结构
选择数据库或ORM工具
优化查询性能
规划索引策略
Install
npx skills add vudovn/ag-kit --skill database-design -g -y
SKILL.md
Frontmatter
{
"name": "database-design",
"version": "1.0.0",
"description": "Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.",
"when_to_use": "When designing database schemas, choosing ORMs, planning migrations, or optimizing queries. When working with Prisma, Drizzle, or SQL files.",
"allowed-tools": "Read, Write, Edit, Glob, Grep"
}
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
Version History
- 211561c Current 2026-08-20 11:38


