Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Database design with schema analysis, index optimization, and migration generation for PostgreSQL, MySQL, MongoDB, and DynamoDB. Use when designing schemas, optimizing queries, planning migrations, or analyzing database performance.
.claude/skills/borghei-database-designer/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 45% | 0% |
| case-20 | ✗→✓ | ▲ Improved | -2% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 14% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 53% | 0% |
| case-07 | ✓→✓ | = Same ✓ | 137% | 0% |
The agent analyzes SQL schemas for normalization compliance, recommends optimal indexes based on query patterns, and generates safe migration scripts with rollback procedures. It produces Mermaid ERDs, detects redundant indexes, and implements zero-downtime expand-contract migration patterns for PostgreSQL and MySQL.
Before designing or migrating, confirm these inputs. If any is unknown or vague, ASK — do not assume:
schema_analyzer.py vs index_optimizer.py vs migration_generator.py)Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.
Load the reference that matches the task — keep this file lean and pull detail on demand:
schema_analyzer.py, index_optimizer.py, and migration_generator.py. Read when running the tools end-to-end.Covers:
Does NOT cover:
performance-profiler skill)database-schema-designer for ORM-adjacent patterns)| Skill | Integration | Data Flow | |-------|-------------|-----------| | migration-architect | Migration strategy and execution planning for large-scale schema changes | Database Designer generates migration SQL; Migration Architect orchestrates multi-service deployment order and rollback coordination | | database-schema-designer | Complementary schema design with focus on application-layer patterns | Database Designer provides normalization analysis; Schema Designer applies ORM mapping and application modeling conventions | | performance-profiler | Runtime validation of index and schema optimization recommendations | Database Designer outputs recommended indexes; Performance Profiler measures actual query plan improvements via EXPLAIN ANALYZE | | api-design-reviewer | Alignment between database schema and API resource contracts | Database Designer defines table structures; API Design Reviewer validates that endpoint schemas match underlying data models | | ci-cd-pipeline-builder | Automated migration execution in deployment pipelines | Database Designer generates migration scripts; CI/CD Pipeline Builder integrates them into deployment stages with validation gates | | observability-designer | Database performance monitoring and alerting post-optimization | Database Designer identifies query patterns; Observability Designer configures slow query alerts and index usage dashboards |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 19,768 | 17,544 | -11% | 1 | 1 | 0% | 4,010 | 4,656 | +16% | 0 | 0 | — |
case-02 | pass→pass | 20,017 | 14,293 | -29% | 1 | 1 | 0% | 3,282 | 3,732 | +14% | 0 | 0 | — |
case-03 | fail→pass | 16,346 | 15,455 | -5% | 1 | 1 | 0% | 2,835 | 4,103 | +45% | 0 | 0 | — |
case-04 | fail→fail | 18,806 | 14,742 | -22% | 1 | 1 | 0% | 2,754 | 3,654 | +33% | 0 | 0 | — |
case-05 | pass→pass | 14,610 | 13,958 | -4% | 1 | 1 | 0% | 2,311 | 3,542 | +53% | 0 | 0 | — |
case-06 | fail→fail | 8,063 | 10,796 | +34% | 1 | 1 | 0% | 1,434 | 3,315 | +131% | 0 | 0 | — |
case-07 | pass→pass | 6,554 | 8,855 | +35% | 1 | 1 | 0% | 1,254 | 2,975 | +137% | 0 | 0 | — |
case-08 | pass→pass | 3,298 | 7,702 | +134% | 1 | 1 | 0% | 610 | 2,867 | +370% | 0 | 0 | — |
case-09 | pass→pass | 6,516 | 8,173 | +25% | 1 | 1 | 0% | 1,212 | 2,623 | +116% | 0 | 0 | — |
case-10 | pass→pass | 5,834 | 10,137 | +74% | 1 | 1 | 0% | 1,062 | 2,868 | +170% | 0 | 0 | — |
case-11 | pass→pass | 8,648 | 10,847 | +25% | 1 | 1 | 0% | 1,376 | 2,979 | +116% | 0 | 0 | — |
case-12 | pass→pass | 14,381 | 14,789 | +3% | 1 | 1 | 0% | 2,465 | 3,789 | +54% | 0 | 0 | — |
case-13 | pass→pass | 9,739 | 14,003 | +44% | 1 | 1 | 0% | 1,769 | 3,686 | +108% | 0 | 0 | — |
case-14 | pass→pass | 6,394 | 9,471 | +48% | 1 | 1 | 0% | 1,122 | 2,988 | +166% | 0 | 0 | — |
case-15 | pass→pass | 8,649 | 11,218 | +30% | 1 | 1 | 0% | 1,487 | 3,223 | +117% | 0 | 0 | — |
case-16 | pass→pass | 9,099 | 13,287 | +46% | 1 | 1 | 0% | 1,712 | 3,574 | +109% | 0 | 0 | — |
case-17 | pass→pass | 7,048 | 9,759 | +38% | 1 | 1 | 0% | 1,231 | 2,838 | +131% | 0 | 0 | — |
case-18 | pass→pass | 11,327 | 17,150 | +51% | 1 | 1 | 0% | 1,798 | 4,055 | +126% | 0 | 0 | — |
case-19 | pass→pass | 13,754 | 26,927 | +96% | 1 | 1 | 0% | 2,371 | 5,893 | +149% | 0 | 0 | — |
case-20 | fail→pass | 21,585 | 13,792 | -36% | 1 | 1 | 0% | 3,581 | 3,501 | -2% | 0 | 0 | — |
case-21 | fail→fail | 19,070 | 5,010 | -74% | 1 | 1 | 0% | 3,828 | 1,963 | -49% | 0 | 0 | — |
case-22 | pass→pass | 6,124 | 6,888 | +12% | 1 | 1 | 0% | 1,038 | 2,330 | +124% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.