postgresql-sql

Design PostgreSQL schemas, migrations, queries, and indexing with sqlc, SQLx, Squirrel, and pg.zig.

5|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/katsutoo/dotfiles --skill postgresql-sql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql-sql
Source: https://github.com/katsutoo/dotfiles/tree/main/config/opencode/skills/postgresql-sql
Command: npx skills add https://github.com/katsutoo/dotfiles --skill postgresql-sql

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL database design, migrations, queries, indexing, and performance optimization standards and practices; it helps teams enforce robust schemas and maintainable SQL workflows.

Core Features & Use Cases

  • Schema design conventions and naming standards for tables, columns, keys, and constraints.
  • Version-controlled migrations with up/down scripts and safe patterns for adding columns, renames, and indexing.
  • Toolchain integration examples with sqlc, SQLx, Squirrel, and pg.zig for type-safe or generated SQL across Go/Rust/Gleam/Zig projects.
  • Real-world use case: designing a new user or order schema and implementing migrations and queries with best practices.

Quick Start

Create a new PostgreSQL schema following the conventions, initialize the migrations folder, and start adding up.sql and down.sql scripts with a type-safe toolchain.

Frequently Asked Questions about postgresql-sql

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

FAQPage Schema
How do I design a PostgreSQL schema with proper naming conventions and constraints?

PostgreSQL schema design requires explicit discipline for naming tables, columns, keys, and constraints to ensure reliable data structures. This involves defining robust schemas with maintainable SQL workflows and verifiable constraints for data-intensive applications.

What are safe patterns for PostgreSQL migrations when adding columns or renaming tables?

PostgreSQL migrations should use version-controlled up.sql and down.sql scripts with safe patterns for adding columns, renaming tables, and indexing. This ensures maintainable SQL workflows and prevents downtime during database schema modifications.

Does this PostgreSQL workflow integrate with sqlc, SQLx, Squirrel, and pg.zig?

PostgreSQL toolchain integration supports sqlc, SQLx, Squirrel, and pg.zig for type-safe or generated SQL across Go, Rust, Gleam, and Zig projects. This provides tooling support for verifiable migrations and efficient query patterns.

How do I optimize PostgreSQL queries and indexing for performance tuning?

PostgreSQL query optimization and indexing improve performance tuning for data-intensive applications. Applying efficient SQL patterns and proper indexing strategies ensures fast query execution and reliable database performance during development and deployment.

What is the best way to structure PostgreSQL migrations for a new user or order schema?

The best way to structure PostgreSQL migrations is using version-controlled up/down scripts following schema design conventions. Initialize a migrations folder, add up.sql and down.sql scripts, and implement queries with a type-safe toolchain for maintainable SQL workflows.