Db transaction design
Skill planifest/planifest-framework/planifest-framework/external-skills/db-transaction-design
Transaction design workflow for boundary definition, isolation-level choice, and contention control under real workload behavior. Use when correctness depends on concurrent read/write semantics; do not use for schema-only tasks that do not affect transaction behavior.From its SKILL.md
npx -y skills add planifest/planifest-framework --skill db-transaction-designAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.0 KB, 330 tokens by cl100k_base, as published. Nobody here has run it
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.
- Model retries as business behavior with idempotent operations.
- External network calls inside DB transactions are a major anti-pattern.
Workflow
- Identify critical invariants and concurrent access patterns.
- Define transaction boundaries per use case.
- Map anomaly risks and select isolation/locking strategy.
- Design timeout, retry, and deadlock-handling behavior.
- Evaluate contention hotspots and redesign access ordering if needed.
- Record assumptions and triggers for revisiting transaction policy.
Common Failure Modes
- Broad transaction scopes serialize unrelated work.
- Retry logic replays side effects without idempotency guard.
- Isolation is changed to fix symptoms without invariant analysis.
Failure Conditions
- Stop when invariants cannot be mapped to transaction boundaries.
- Stop when retry behavior can duplicate irreversible side effects.
- Escalate when contention cannot be controlled without workflow redesign.
What ships with it: 1 file
11.3 KB alongside SKILL.md
- attribution.txt11.3 KB