agent-dba

Model PostgreSQL schemas, migrations, and RLS policies for multi-tenant applications.

Updated Jan 29, 2026
One-click install
npx skills add https://github.com/fabiomilennials1234-a11y/v8milennialsb2bv2 --skill agent-dba
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-dba
Source: https://github.com/fabiomilennials1234-a11y/v8milennialsb2bv2/tree/main/.claude/skills/agent-dba
Command: npx skills add https://github.com/fabiomilennials1234-a11y/v8milennialsb2bv2 --skill agent-dba

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The skill addresses the need for robust PostgreSQL governance by providing structured guidance on schema design, migrations, and Row-Level Security in multi-tenant environments, ensuring data integrity and predictable performance.

Core Features & Use Cases

  • PostgreSQL core modeling: relational design, constraints, data types, and index strategies
  • Row-Level Security: policies by operation, organization_id boundaries, jwt/auth claims considerations
  • Migrations: zero-downtime changes with reversible up/down, data vs schema separation
  • Performance: EXPLAIN ANALYZE usage, indexing decisions, and query optimization
  • Automation: pg_cron, triggers, functions, and maintenance routines
  • Use Case: applies to SaaS platforms needing strict data isolation and auditable schema changes

Quick Start

Audit your PostgreSQL schema and RLS policies and implement a safe, zero-downtime migration to bootstrap multi-tenant data access.

Frequently Asked Questions about agent-dba

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

FAQPage Schema
How do I write zero-downtime PostgreSQL migrations for a multi-tenant SaaS application?

PostgreSQL Row-Level Security policies enforce data isolation by filtering rows based on organization_id boundaries and JWT claims. RLS operates at the database engine level, ensuring tenants only access their authorized data regardless of application query logic.

What is the best way to optimize slow PostgreSQL queries in complex data workloads?

Optimizing slow PostgreSQL queries involves running EXPLAIN ANALYZE to inspect execution plans, identifying sequential scans, and implementing targeted index strategies. This methodical performance review reveals bottlenecks in complex data workloads for precise remediation.

How does Row-Level Security work for multi-tenant data isolation in PostgreSQL?

PostgreSQL Row-Level Security policies enforce data isolation by filtering rows based on organization_id boundaries and JWT claims. RLS operates at the database engine level, ensuring tenants only access their authorized data regardless of application query logic.

Can I use PostgreSQL triggers and pg_cron for automated database maintenance routines?

PostgreSQL triggers and pg_cron support automated database maintenance routines by scheduling recurring tasks and executing functions on data events. This automation maintains data integrity and handles background operations without manual intervention.

When do I need to separate schema migrations from data migrations in PostgreSQL?

Separating schema migrations from data migrations is necessary during zero-downtime changes to prevent locking tables during large data backfills. This separation ensures predictable performance and allows reversible deployments in multi-tenant environments.