database-design

Guide database selection, schema design, indexing, and query optimization.

4|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/alexgutscher26/ClawTrace --skill database-design-alexgutscher26
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/alexgutscher26/ClawTrace/tree/main/.agent/skills/database-design
Command: npx skills add https://github.com/alexgutscher26/ClawTrace --skill database-design-alexgutscher26

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill helps users make informed decisions about database selection, schema design, indexing, ORM choices, and query optimization, preventing common anti-patterns and ensuring efficient, scalable database solutions.

Core Features & Use Cases

  • Database & ORM Selection: Guides users through choosing the right database (PostgreSQL, Neon, Turso, SQLite) and ORM (Drizzle, Prisma, Kysely) based on project requirements.
  • Schema Design Best Practices: Covers normalization, primary key strategies, timestamp conventions, and relationship types.
  • Performance Tuning: Provides guidance on indexing strategies and query optimization techniques like analyzing EXPLAIN ANALYZE and solving N+1 problems.
  • Safe Migrations: Outlines a strategy for zero-downtime schema changes, especially relevant for serverless databases.
  • Use Case: A developer needs to choose between PostgreSQL and Turso for a new edge application and wants to ensure their schema is well-designed and indexed for performance.

Quick Start

Use the database-design skill to help me choose a database for an edge deployment.

Frequently Asked Questions about database-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose the right relational database for an edge deployment?

Selecting a database for edge deployment requires evaluating PostgreSQL, Neon, and Turso against your latency and scaling needs. This Skill guides you through matching serverless architecture constraints with the right database and ORM for your specific project requirements.

What are the best practices for relational database schema design and indexing?

Database schema design best practices include normalization, primary key strategies, and timestamp conventions. Effective indexing strategies are also covered to ensure efficient query performance, preventing common structural anti-patterns and ensuring scalable database solutions.

How do I resolve the N+1 query problem when using an ORM like Drizzle or Prisma?

Resolving the N+1 query problem requires analyzing query execution plans using `EXPLAIN ANALYZE`. This Skill provides optimization techniques to identify inefficient ORM data fetching patterns and implement strategies that drastically reduce redundant database queries.

How do I run zero-downtime database migrations in a serverless environment?

Running zero-downtime database migrations in a serverless environment requires safe schema change practices to avoid disrupting active connections. This Skill outlines specific migration strategies to ensure seamless schema updates without downtime.

Should I use Drizzle, Prisma, or Kysely for my next database project?

Choosing between Drizzle, Prisma, and Kysely depends on your project's type safety needs and query complexity. This Skill helps you compare these ORMs based on your specific database selection and schema design requirements.