One-click install
npx skills add https://github.com/roanbrasil/engineer-grade-agent-skills --skill database-design-roanbrasil
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/roanbrasil/engineer-grade-agent-skills/tree/main/skills/database-design
Command: npx skills add https://github.com/roanbrasil/engineer-grade-agent-skills --skill database-design-roanbrasil

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill eliminates the risk of building fragile, poorly performing PostgreSQL databases that cause slow queries, unexpected downtime during schema changes, and data integrity issues in production systems.

Core Features & Use Cases

  • Schema Design & Normalization: Follow best practices for surrogate keys, naming conventions, and appropriate denormalization to build maintainable, efficient data models.
  • Indexing & Query Optimization: Create targeted indexes (partial, composite, covering) and use EXPLAIN ANALYZE to diagnose and fix slow query performance.
  • Zero-Downtime Migrations: Roll out schema changes (new columns, index additions, type changes) without disrupting live production traffic.
  • Transaction & Locking Best Practices: Configure appropriate isolation levels and locking strategies to ensure data consistency for high-concurrency workloads. Use case: For example, if you are adding a new feature to a high-traffic SaaS product, use this skill to design the new feature's database schema, add optimal indexes for common user queries, and deploy the schema change without any service interruption.

Quick Start

Use the database-design skill to review your existing orders table schema and suggest indexing improvements to reduce query latency for customer order history lookups.

Frequently Asked Questions about database-design

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

FAQPage Schema
How do I add a new column to a PostgreSQL database without causing downtime?

Zero-downtime migrations in PostgreSQL roll out schema changes like new columns or index additions without disrupting live production traffic. This approach uses locking strategies and transaction isolation to ensure data consistency throughout the non-disruptive schema evolution process.

What is the best way to optimize slow PostgreSQL query performance?

PostgreSQL query optimization involves using EXPLAIN ANALYZE to diagnose slow query execution and creating targeted indexes. You build partial, composite, or covering indexes to improve performance and reduce query latency for high-frequency database lookups.

How do I design a normalized PostgreSQL schema for a high-traffic SaaS application?

PostgreSQL schema design for high-traffic applications uses best practices for surrogate keys, naming conventions, and appropriate denormalization. This builds maintainable, efficient data models that meet requirements for normalized data structures and ACID-compliant data integrity.

How does transaction isolation configuration affect high-concurrency workloads in PostgreSQL?

Transaction isolation configuration in PostgreSQL ensures data consistency for high-concurrency workloads by managing locking strategies. Configuring the appropriate isolation levels prevents data conflicts and maintains ACID-compliant data integrity during simultaneous relational database transactions.

When should I use composite or partial indexes for PostgreSQL database design?

PostgreSQL database design uses partial, composite, and covering indexes to target specific query patterns and reduce query latency. You create these targeted indexes based on EXPLAIN ANALYZE diagnostics to improve query execution performance for common user queries.