database-design

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

5 stars

Best use case

database-design is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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

Teams using database-design should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/database-design/SKILL.md --create-dirs "https://raw.githubusercontent.com/FrancoStino/opencode-skills-collection/main/bundled-skills/database-design/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/database-design/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How database-design Compares

Feature / Agentdatabase-designStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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.

## Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

Related Skills

web-design-guidelines

5
from FrancoStino/opencode-skills-collection

Review files for compliance with Web Interface Guidelines.

vector-database-engineer

5
from FrancoStino/opencode-skills-collection

Expert in vector databases, embedding strategies, and semantic search implementation. Masters Pinecone, Weaviate, Qdrant, Milvus, and pgvector for RAG applications, recommendation systems, and similar

uniprot-database

5
from FrancoStino/opencode-skills-collection

Direct REST API access to UniProt. Protein searches, FASTA retrieval, ID mapping, Swiss-Prot/TrEMBL. For Python workflows with multiple databases, prefer bioservices (unified interface to 40+ services). Use this for direct HTTP/REST work or UniProt-specific control.

ui-ux-designer

5
from FrancoStino/opencode-skills-collection

Create interface designs, wireframes, and design systems. Masters user research, accessibility standards, and modern design tools.

tool-design

5
from FrancoStino/opencode-skills-collection

Build tools that agents can use effectively, including architectural reduction patterns. Use when creating new tools for agent systems, debugging tool-related failures or misuse, or optimizing existing tool sets for better agent performance.

tailwind-design-system

5
from FrancoStino/opencode-skills-collection

Build production-ready design systems with Tailwind CSS, including design tokens, component variants, responsive patterns, and accessibility.

stitch-ui-design

5
from FrancoStino/opencode-skills-collection

Expert guidance for crafting effective prompts in Google Stitch, the AI-powered UI design tool by Google Labs. This skill helps create precise, actionable prompts that generate high-quality UI designs for web and mobile applications.

stitch-design-taste

5
from FrancoStino/opencode-skills-collection

Use when generating Google Stitch DESIGN.md systems for premium typography, color, layout, motion intent, and anti-generic UI rules.

sqlmap-database-pentesting

5
from FrancoStino/opencode-skills-collection

Provide systematic methodologies for automated SQL injection detection and exploitation using SQLMap.

redesign-existing-projects

5
from FrancoStino/opencode-skills-collection

Use when upgrading existing websites or apps by auditing generic UI patterns and applying premium design fixes without rewrites.

radix-ui-design-system

5
from FrancoStino/opencode-skills-collection

Build accessible design systems with Radix UI primitives. Headless component customization, theming strategies, and compound component patterns for production-grade UI libraries.

pubmed-database

5
from FrancoStino/opencode-skills-collection

Direct REST API access to PubMed. Advanced Boolean/MeSH queries, E-utilities API, batch processing, citation management. For Python workflows, prefer biopython (Bio.Entrez). Use this for direct HTTP/REST work or custom API implementations.