transactional-patterns

transactional-patterns is a skill for Claude Code from vaquarkhan/Fullstack-development-agent-skills. It costs 44 tokens per session (1,847 once invoked), scanned A, original, MIT.

A guide for making multi-step database work atomic with Spring's transaction support. An atomic operation either completes all its database changes or rolls them back as one unit.

In plain words
What is it for?
Use it when adding or reviewing @Transactional methods, coordinating several writes, configuring transaction behavior, or designing distributed workflows and after-commit actions.
Why use it?
It helps avoid partial updates and mistakes with transaction scope, propagation, isolation, read-only operations, and work that happens after a commit. It also keeps transaction boundaries out of controllers and repositories.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the fullstack-development-agent-skills plugin — 129 skills, 10 commands shipped together

Good fit Use it when adding or reviewing @Transactional methods, coordinating several writes, configuring transaction behavior, or designing distributed workflows and after-commit actions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vaquarkhan/fullstack-development-agent-skills/transactional-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vaquarkhan/Fullstack-development-agent-skills --skill transactional-patterns
Clone the repo
git clone --depth 1 https://github.com/vaquarkhan/Fullstack-development-agent-skills

Made for: Claude Code.

Or install fullstack-development-agent-skills, the plugin that ships this one along with the rest of its 129 skills, 10 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for transactional-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/vaquarkhan/fullstack-development-agent-skills/transactional-patterns.svg)](https://agentmods.dev/skills/vaquarkhan/fullstack-development-agent-skills/transactional-patterns)
Your own site
<a href="https://agentmods.dev/skills/vaquarkhan/fullstack-development-agent-skills/transactional-patterns"><img src="https://agentmods.dev/badge/skills/vaquarkhan/fullstack-development-agent-skills/transactional-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,847 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.01847
Opus 5 $0.00022 $0.00924
Sonnet 5 $0.00009 $0.00369
Haiku 4.5 $0.00004 $0.00185

Measured today against content hash ea9f8a7d87f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

transactional-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill-packs/java/spring-boot/transactional-patterns/SKILL.md · 241 lines

How it starts

The opening of the file, as written. The whole thing — 241 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Transactional Patterns

Use When

  • Configuring @Transactional propagation, sagas, or after-commit side effects
  • Spring Boot code generation or refactor where agent defaults would be wrong

Workflow

  1. Confirm the change matches this skill's domain triggers before coding.
  2. Follow the domain guide conventions and gotchas below — not generic Spring Boot defaults.
  3. Apply project-specific response envelopes, DTO boundaries, and dependency injection rules.
  4. Validate with targeted tests (slice, integration, or contract as appropriate).
  5. Capture evidence before merge: tests, migration notes, or observability proof.

Required Checks

  • Constructor injection used; no @Autowired field injection on new code
  • Controllers return DTOs/envelopes — never raw JPA entities
  • Business logic stays in @Service layer, not controllers or repositories
  • Error handling uses project-standard envelope or RFC 9457 ProblemDetail

Domain Guide

Basic Rules

  • @Transactional belongs on service methods, never controllers or repositories
  • Default propagation is REQUIRED — joins existing transaction or creates one
  • Always use on methods that write to the DB or coordinate multiple writes
  • @Transactional(readOnly = true) on all read-only service methods — enables optimizations
@Service
@RequiredArgsConstructor
@Transactional(readOnly = true) // default for all methods in this service
public class OrderService {

    @Transactional // overrides readOnly for writes
    public Order createOrder(CreateOrderRequest request) {
        inventoryService.reserve(request.items()); // participates in same TX
        return orderRepository.save(Order.from(request));
    }

    public Optional<Order> findById(UUID id) {
        return orderRepository.findById(id); // readOnly = true inherited
    }
}

Propagation

Propagation Behavior
REQUIRED (default) Join existing TX or create new
REQUIRES_NEW Always create new TX, suspend existing
SUPPORTS Join if exists, proceed without TX if not
NOT_SUPPORTED Always run without TX
MANDATORY Must have existing TX, throw if not
NEVER Must NOT have TX, throw if one exists

Read the full file on GitHub · 241 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 241 lines · 44 tokens per session scan A ea9f8a7d87f6

Subscribe to this mod's changes

transactional-patterns is a skill published in the GitHub repository vaquarkhan/Fullstack-development-agent-skills (2 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 1,847 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.