db-transaction-design

Installation
SKILL.md

DB Transaction Design

Overview

Use this skill to design transaction behavior that protects invariants while avoiding avoidable contention and deadlocks.

Scope Boundaries

  • Concurrent workflows must preserve business invariants.
  • Anomalies (lost update, write skew, phantom) are possible.
  • Lock contention or deadlocks are degrading reliability.

Core Judgments

  • Transaction boundary: what must be atomic versus eventually consistent.
  • Isolation level per workflow and anomaly tolerance.
  • Locking strategy: optimistic, pessimistic, or hybrid.
  • Retry/idempotency behavior under deadlock/timeouts.

Practitioner Heuristics

  • Keep transactions as short as possible while preserving invariants.
  • Choose isolation by anomaly risk, not blanket highest level.
Related skills

More from kentoshimizu/sw-agent-skills

Installs
4
GitHub Stars
5
First Seen
Feb 28, 2026