howto-develop-with-postgres

Enforce transaction-safe PostgreSQL development with TypeScript and Drizzle ORM.

5|1|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/ed3dai/ed3d-plugins-testing --skill howto-develop-with-postgres
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: howto-develop-with-postgres
Source: https://github.com/ed3dai/ed3d-plugins-testing/tree/main/plugins/ed3d-house-style/skills/howto-develop-with-postgres
Command: npx skills add https://github.com/ed3dai/ed3d-plugins-testing --skill howto-develop-with-postgres

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured approach to PostgreSQL development in TypeScript by enforcing transactional boundaries, type-safe models, and consistent naming conventions to prevent data corruption and drift between design and implementation.

Core Features & Use Cases

  • TX_ transaction starters: Prefix methods that start transactions with TX_ to ensure explicit transactional boundaries.
  • TX participants: Non-prefix methods participate in transactions by accepting an executor parameter.
  • Type safety: ULID/UUID handling and typed JSONB to prevent runtime type errors.
  • Naming & schema patterns: Enforce snake_case conventions, standard timestamp mixins, soft deletes, and robust indexing strategies.
  • Migrations workflow: Guidance for generate + migrate flows with drizzle-kit to keep schemas in sync with code.

Quick Start

Configure a TS + Drizzle project to enforce TX_ transaction starters, read/write separation, ULID/UUID typing, and snake_case conventions, then implement example service methods following the documented patterns.

Frequently Asked Questions about howto-develop-with-postgres

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

FAQPage Schema
How do I enforce safe transactions with Drizzle ORM and PostgreSQL in TypeScript?

To enforce safe transactions with Drizzle ORM, prefix transaction starter methods with TX_ and have participant methods accept an executor parameter. This prevents data corruption and drift during multi-step writes.

What's the best way to manage migrations and type safety in a TypeScript PostgreSQL project?

Manage migrations and type safety by using drizzle-kit for generate and migrate flows to sync schemas with code. Enforce ULID/UUID typing and typed JSONB to prevent runtime type errors across your database models.

Why does data corruption happen during multi-step writes in PostgreSQL and how do I prevent it?

Data corruption during multi-step writes happens when transactional boundaries are not explicit. Prevent it by using TX_ transaction starters and participant methods with an executor to ensure atomic operations and read-write separation.

Does Drizzle ORM support snake_case conventions and soft deletes for database schemas?

Yes, Drizzle ORM supports enforcing snake_case naming conventions, standard timestamp mixins, and soft deletes. These patterns maintain consistency and prevent drift between database design and TypeScript implementation.

Can I use ULID and typed JSONB for type-safe data modeling in PostgreSQL?

Yes, you can use ULID/UUID handling and typed JSONB for type-safe data modeling in PostgreSQL. This approach prevents runtime type errors and ensures strict data consistency across your TypeScript backend services.

When do I need transaction boundaries and read-write separation in backend services?

You need transaction boundaries and read-write separation in backend services when performing multi-step writes to PostgreSQL. This prevents partial updates and data drift by ensuring operations either complete entirely or roll back safely.