business-logic-entry-point-transaction-isolation-levels

Installation
SKILL.md

Transaction Isolation Levels for Business Logic Entry Points

Goal

When a business-logic entry point wraps its flow in a database transaction and follows Command-Query Separation, set the transaction isolation level based on whether the entry point is a command handler or a query handler, when the underlying persistence technology supports configurable isolation levels.

  • Query handlers use the least blocking isolation level available in the project's database.
  • Command handlers use REPEATABLE READ.

If the persistence technology does not support configurable isolation levels, this skill does not apply.

A read-only query handler has a further option: because the least-blocking isolation level provides no cross-statement snapshot, the handler MAY skip the interactive transaction altogether and read over the connection pool instead of opening one at the least-blocking level. See the exception in [[business-logic-entry-point-database-transaction]]. When it does open a transaction, the rule below (least-blocking level for query handlers, REPEATABLE READ for command handlers) still applies.

When This Skill Applies

This skill activates only when all four conditions are met:

Installs
15
First Seen
Mar 24, 2026
business-logic-entry-point-transaction-isolation-levels — code-sherpas/agent-skills