MR
Mayur Rathi
@mayurrathi
⭐ 5 GitHub stars

Database Design

Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.

mkdir -p ./skills/database-design && curl -sfL https://raw.githubusercontent.com/mayurrathi/awesome-agent-skills/main/skills/database-design/SKILL.md -o ./skills/database-design/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# 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


When to Use

This skill is applicable to execute the workflow or actions described in the overview.

🎯 Best For

  • Claude users
  • Designers
  • Creative professionals
  • Product teams

💡 Use Cases

  • Design system documentation
  • Component specification creation

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Database Design to Your Work

    Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.

  4. 4

    Review and Refine

    Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.

❓ Frequently Asked Questions

Does Database Design generate production-ready design specs?

It generates detailed specifications that developers can use directly. Review and adjust for your specific design system.

How do I install Database Design?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/database-design/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Not reading the full skill

Skills contain important context and edge cases beyond the quick start.

🔗 Related Skills