data-schema-design

Official

Design and manage PostgreSQL schemas with precision and control.

AuthorCanhada-Labs
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides a comprehensive framework for designing, managing, and maintaining PostgreSQL schemas, ensuring data integrity, security, and performance.

Core Features & Use Cases

  • Schema Design: Offers guidelines for table, column, and index naming conventions, as well as RLS policy patterns.
  • Migration Strategy: Provides principles for idempotent, additive-only migrations, and strategies for handling enums and tier consistency.
  • Retention Policy Design: Assists in defining and implementing retention policies for different tables based on their usage and regulatory requirements.
  • Index Strategy: Offers guidelines for composite indexes, partial indexes, and index design rules for hot-path queries.
  • Security and Safety: Ensures the use of SECURITY DEFINER functions with explicit search_path settings to prevent schema injection vulnerabilities.
  • DDL Template: Provides a template for creating new tables with best practices for primary keys, foreign keys, timestamps, and uniqueness constraints.
  • Disaster Recovery: Outlines a recovery procedure for schema and data loss scenarios.
  • Anti-Patterns: Identifies common anti-patterns to avoid in database design and query optimization.
  • Query Optimization Discipline: Emphasizes the use of EXPLAIN ANALYZE for query optimization and the importance of tracking plan regressions.
  • ETL/ELT and Pipeline Schema Discipline: Offers a rubric for choosing between batch and streaming models and guidelines for schema discipline in pipeline tables.

Quick Start

Use the data-schema-design skill to review and optimize the schema for your PostgreSQL database.

Dependency Matrix

Required Modules

postgresprismadrizzlekyselydjangogolang-migratesupabase

Components

scriptsreferencesassets

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: data-schema-design
Download link: https://github.com/Canhada-Labs/ceo-orchestration/archive/main.zip#data-schema-design

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 620,000+ vetted skills library on demand.