dannykkh/skill-olympus/database-schema-designer
Claude Code and agent skill by dannykkh/skill-olympus
- community
Checking that the SKILL.md file is still in the repository.
Design production-ready database schemas for SQL and NoSQL databases. Use when user asks to "design schema", "create tables", "database design", "ERD", "data model", or when starting a project that needs database structure. Triggers on "normalize", "migration plan", "index strategy", "테이블 설계".
Install
npx vskill@latest install dannykkh/skill-olympus/database-schema-designerSKILL.md
The same SKILL.md was published earlier as dannykkh/skill-olympus/database-schema-designer.
Database Schema Designer
Design production-ready database schemas with best practices built-in.
Quick Start
Just describe your data model:
You'll get a complete SQL schema like:
위 예시는 MySQL 기준입니다(AUTO_INCREMENT). PostgreSQL은 PK를BIGINT GENERATED ALWAYS AS IDENTITY(또는BIGSERIAL)로 쓰세요. 인덱스는CREATE INDEX로 분리하면 양쪽에서 동작합니다(인라인INDEX ...는 MySQL/MariaDB 전용 → Postgres 문법 에러). 이 스킬은 DB-First라 대상 DB에 맞춰 설계가 달라집니다.
What to include in your request:
- Entities (users, products, orders)
- Key relationships (users have orders, orders have items)
- Scale hints (high-traffic, millions of records)
- Database preference (SQL/NoSQL) - defaults to SQL if not specified
Triggers
| Trigger | Example | |
|---|---|---|
design schema | "design a schema for user authentication" | |
database design | "database design for multi-tenant SaaS" | |
create tables | "create tables for a blog system" | |
schema for | "schema for inventory management" | |
model data | "model data for real-time analytics" | |
I need a database | "I need a database for tracking orders" | |
design NoSQL | "design NoSQL schema for product catalog" |
Key Terms
| Term | Definition | |
|---|---|---|
| Normalization | Organizing data to reduce redundancy (1NF → 2NF → 3NF) | |
| 3NF | Third Normal Form - no transitive dependencies between columns | |
| OLTP | Online Transaction Processing - write-heavy, needs normalization | |
| OLAP | Online Analytical Processing - read-heavy, benefits from denormalization | |
| Foreign Key (FK) | Column that references another table's primary key | |
| Index | Data structure that speeds up queries (at cost of slower writes) | |
| Access Pattern | How your app reads/writes data (queries, joins, filters) | |
| Denormalization | Intentionally duplicating data to speed up reads |
Quick Reference
| Task | Approach | Key Consideration | |
|---|---|---|---|
| New schema | Normalize to 3NF first | Domain modeling over UI | |
| SQL vs NoSQL | Access patterns decide | Read/write ratio matters | |
| Primary keys | INT or UUID | UUID for distributed systems | |
| Foreign keys | Always constrain | ON DELETE strategy critical | |
| Indexes | FKs + WHERE columns | Column order matters | |
| Migrations | Always reversible | Backward compatible first |
Process Overview
DB-First: 대상 DB를 먼저 정하고 그 DB의 강점으로 구조를 정한다(PostgreSQL JSONB·RLS, MySQL 정규화, MongoDB 임베딩). DB 감지 순서, DB별 설계 매트릭스, 엔티티 추출·관계 판별, Audit 컬럼, ERD 표기, db-schema.md 출력 형식은 정본인 젭마인 skills/zephermine/references/schema-design-guide.md를 따른다(젭마인은 활성 스킬이라 활성 스킬 루트에서 읽힌다). 이 스킬에는 사본을 두지 않는다.
Commands
| Command | When to Use | Action | |
|---|---|---|---|
design schema for {domain} | Starting fresh | Full schema generation | |
normalize {table} | Fixing existing table | Apply normalization rules | |
add indexes for {table} | Performance issues | Generate index strategy | |
migration for {change} | Schema evolution | Create reversible migration | |
review schema | Code review | Audit existing schema |
Workflow: Start with design schema → iterate with normalize → optimize with add indexes → evolve with migration
Core Principles
| Principle | WHY | Implementation | |
|---|---|---|---|
| Model the Domain | UI changes, domain doesn't | Entity names reflect business concepts | |
| Data Integrity First | Corruption is costly to fix | Constraints at database level | |
| Optimize for Access Pattern | Can't optimize for both | OLTP: normalized, OLAP: denormalized | |
| Plan for Scale | Retrofitting is painful | Index strategy + partitioning plan |
Anti-Patterns
| Avoid | Why | Instead | |
|---|---|---|---|
| VARCHAR(255) everywhere | Wastes storage, hides intent | Size appropriately per field | |
| FLOAT for money | Rounding errors | DECIMAL(10,2) | |
| Missing FK constraints | Orphaned data | Always define foreign keys | |
| No indexes on FKs | Slow JOINs | Index every foreign key | |
| Storing dates as strings | Can't compare/sort | DATE, TIMESTAMP types | |
| SELECT * in queries | Fetches unnecessary data | Explicit column lists | |
| Non-reversible migrations | Can't rollback | Always write DOWN migration | |
| Adding NOT NULL without default | Breaks existing rows | Add nullable, backfill, then constrain |
Verification Checklist
After designing a schema:
- [ ] Every table has a primary key
- [ ] All relationships have foreign key constraints
- [ ] ON DELETE strategy defined for each FK
- [ ] Indexes exist on all foreign keys
- [ ] Indexes exist on frequently queried columns
- [ ] Appropriate data types (DECIMAL for money, etc.)
- [ ] NOT NULL on required fields
- [ ] UNIQUE constraints where needed
- [ ] CHECK constraints for validation
- [ ] created_at and updated_at timestamps
- [ ] Migration scripts are reversible
- [ ] Tested on staging with production data
Deep Dives (References)
| 주제 | 파일 | |
|---|---|---|
| DB-First Design (DB별 설계·출력 형식) — 정본은 젭마인 | skills/zephermine/references/schema-design-guide.md | |
| Normalization (SQL 정규화) | references/normalization.md | |
| Data Types (타입 선택) | references/data-types.md | |
| Indexing Strategy (인덱스 전략) | references/indexing-strategy.md | |
| Constraints (제약 조건) | references/constraints.md | |
| Relationship Patterns (관계 패턴) | references/relationship-patterns.md | |
| Migrations (마이그레이션) | references/migrations.md | |
| NoSQL Design (MongoDB) | references/nosql-mongodb.md | |
| Performance Optimization | references/performance-optimization.md |
Related Resources
- DB별 구현: 네이티브 작업자 + 프로젝트 DB 버전·schema·migration 도구·테스트
- Supabase Best Practices:
skills/supabase-postgres-best-practices/SKILL.md
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/database-schema-designer/SKILL.md
Popularity
- Repository stars
- 7
- Repository forks
- 1
- 7-day trend score
- 10
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dannykkh/skill-olympus/database-schema-designer)