Skip to content
Back to skills

Transactions And Consistency

ASecurity

Choose transaction boundaries and handle concurrent writes correctly.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 3, 2026
developmenttestingdatabase

Works with

  • cli

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add Andersseen/agentyx --skill transactions-and-consistency --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Transactions And Consistency?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Transactions And Consistency
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/andersseen-transactions-and-consistency/badge)](https://www.skillsdirectory.com/skills/andersseen-transactions-and-consistency)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: transactions-and-consistency
description: Choose transaction boundaries and handle concurrent writes correctly.
---

# Transactions and consistency

Concurrency defects are rare in testing and constant in production. Decide the boundary and the
isolation deliberately.

## Scope transactions tightly

A transaction should cover exactly the writes that must succeed or fail together. Long transactions
hold locks and connections, and turn one slow operation into a system-wide stall.

## Keep external calls outside

Never hold a transaction open across a network request to another service. The remote call cannot be
rolled back, and its latency becomes lock duration.

## Know your isolation level

The default isolation of your database determines which anomalies are possible. Read-modify-write
sequences need explicit locking or a compare-and-set, because reading and then writing is not atomic.

## Make retries safe

Give operations an idempotency key so a retried request cannot apply twice. Clients, queues and
proxies all retry, and at-least-once delivery is the normal case.

## Prefer atomic operations to read-then-write

Let the database compute the new value in one statement instead of reading it into the application
and writing it back. That closes the window where another writer intervenes.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.