Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aj-geddes avatar

Transaction Management

  • 411 installs
  • 305 repo stars
  • Updated March 4, 2026
  • aj-geddes/useful-ai-prompts

transaction-management is an agent skill that models ACID transactions, isolation levels, retries, and rollback paths for developers who need consistent multi-step database writes under concurrency.

About

transaction-management is an aj-geddes/useful-ai-prompts agent skill for implementing ACID-compliant database transactions on PostgreSQL and MySQL. It teaches BEGIN/COMMIT/ROLLBACK patterns for multi-statement transfers, isolation level selection, explicit row locking, deadlock detection, timeout configuration, and distributed transaction coordination for financial and inventory updates. Seven reference guides cover PostgreSQL and MySQL transactions, isolation levels, explicit locking, and deadlock prevention strategies. Developers reach for transaction-management when payment transfers must be atomic, inventory decrements race under concurrency, or partial failures require deterministic rollback instead of orphaned rows.

  • Isolation level selection
  • Rollback and compensation flows
  • Idempotency and retry patterns
  • Deadlock avoidance guidance
  • ORM transaction scope examples

Transaction Management by the numbers

  • 411 all-time installs (skills.sh)
  • Ranked #143 of 911 Databases skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill transaction-management

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs411
repo stars305
Last updatedMarch 4, 2026
Repositoryaj-geddes/useful-ai-prompts

How do you implement ACID database transactions?

Model ACID transactions, isolation levels, retries, and rollback paths so multi-step writes stay consistent under concurrency, partial failures, and payment or inventory updates.

Who is it for?

Backend developers writing PostgreSQL or MySQL code where payments, inventory, or ledger updates must stay consistent under concurrent writes.

Skip if: Developers on eventually consistent NoSQL stores who do not use SQL BEGIN/COMMIT transaction semantics.

When should I use this skill?

Implementing money transfers, inventory updates, choosing isolation levels, or debugging deadlocks and partial write failures.

What you get

Transaction-wrapped SQL, isolation level choices, locking strategies, rollback handlers, and deadlock prevention patterns.

  • transaction-wrapped SQL
  • isolation level policy
  • deadlock retry strategy

By the numbers

  • Bundles 7 reference guides for PostgreSQL and MySQL transactions and locking
  • Quick-start demonstrates atomic two-account balance transfer with BEGIN/COMMIT

Files

SKILL.mdMarkdownGitHub ↗

Transaction Management

Table of Contents

Overview

Implement robust transaction management with ACID compliance, concurrency control, and error handling. Covers isolation levels, locking strategies, and deadlock resolution.

When to Use

  • ACID transaction implementation
  • Concurrent data modification handling
  • Isolation level selection
  • Deadlock prevention and resolution
  • Transaction timeout configuration
  • Distributed transaction coordination
  • Financial transaction safety

Quick Start

Simple Transaction:

-- Start transaction
BEGIN;

-- Multiple statements
UPDATE accounts SET balance = balance - 100 WHERE id = 1;
UPDATE accounts SET balance = balance + 100 WHERE id = 2;

-- Commit changes
COMMIT;

-- Or rollback
ROLLBACK;

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
PostgreSQL TransactionsPostgreSQL Transactions
MySQL TransactionsMySQL Transactions
PostgreSQL Isolation LevelsPostgreSQL Isolation Levels
MySQL Isolation LevelsMySQL Isolation Levels
PostgreSQL Explicit LockingPostgreSQL Explicit Locking
MySQL LockingMySQL Locking
Deadlock PreventionPostgreSQL - Deadlock Detection:

Best Practices

✅ DO

  • Follow established patterns and conventions
  • Write clean, maintainable code
  • Add appropriate documentation
  • Test thoroughly before deploying

❌ DON'T

  • Skip testing or validation
  • Ignore error handling
  • Hard-code configuration values

Related skills

How it compares

Use transaction-management for SQL ACID semantics and isolation tuning; use an ORM-migration skill when schema changes—not transactional correctness—are the primary concern.

FAQ

Which databases does transaction-management cover?

transaction-management covers PostgreSQL and MySQL with seven reference guides on transactions, isolation levels, explicit locking, and deadlock prevention. The quick-start demonstrates a two-account balance transfer using BEGIN and COMMIT.

When should developers use transaction-management?

transaction-management applies when multi-step writes—payments, inventory, or ledger updates—must stay ACID-compliant under concurrency. The skill helps choose isolation levels, configure timeouts, and add rollback paths for partial failures.

Databasesdatabasespipelines

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.