Agent skill

Doctrine Transactions

by dev-toolings in dev-toolings/superpowers-symfony

Handle Doctrine transactions (ORM 3 wrapInTransaction), optimistic/pessimistic locking, flush strategies, and transaction boundaries

MITAuto-check: notesDatabases

Install Doctrine Transactions

skills CLI
$ npx skills add dev-toolings/superpowers-symfony --skill doctrine-transactions -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dev-toolings/superpowers-symfony doctrine-transactions --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dev-toolings/superpowers-symfony.git skills-src && mkdir -p .claude/skills && cp -r skills-src/content/skills/doctrine-transactions .claude/skills/doctrine-transactions && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
doctrine-transactions
GitHub stars
222
Token cost
~463 tokens
SKILL.md length
203 words
Files
2
Skills in repo
44
Repo updated
First seen
Licence
MIT

At a glance

Handle Doctrine transactions (ORM 3 wrapInTransaction), optimistic/pessimistic locking, flush strategies, and transaction boundaries

  • Works in 5 steps: Place the transaction boundary in the… → Group related changes and flush once,… → Pick the concurrency strategy:… → …
  • Tasks that involve ORMs and data access
  • SKILL.md covers Use when, Default workflow, Guardrails and Progressive disclosure, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Doctrine Transactions is an agent skill from dev-toolings/superpowers-symfony. Handle Doctrine transactions (ORM 3 wrapInTransaction), optimistic/pessimistic locking, flush strategies, and transaction boundaries

Its SKILL.md is about 460 tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `reference.md`).

It sits in Databases, covering ORMs and data access. The repository describes itself as: Claude Code plugin for Symfony 7.4 LTS & 8.x — 44 skills, 7 AI subagents & 13 commands for API Platform v4, Doctrine ORM 3, TDD (Pest/PHPUnit), Messenger, security & DDD. The licence is MIT.

When your agent uses it

  • Tasks that involve ORMs and data access

Example prompts

  • “/doctrine-transactions”

Requirements

  • Pre-approved tools (allowed-tools): Read, Glob, Grep, Write, Edit, Bash

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Place the transaction boundary in the service layer, not in the controller.
  2. Group related changes and flush once, inside wrapInTransaction().
  3. Pick the concurrency strategy: #[ORM\Version] optimistic locking for edits, PESSIMISTIC_WRITE for short critical sections.
  4. Handle OptimisticLockException and constraint violations explicitly.
  5. After a rollback, clear the EntityManager and re-fetch what you still need.

What it can do on your machine

Read from SKILL.md and the folder at commit 459bcd0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Glob
    • Grep
    • Write
    • Edit
    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Doctrine Transactions loads about 463 tokens when it runs. Until then it costs about 39 tokens; SKILL.md has 203 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~39
When it runs · the whole SKILL.md, loaded when a task matches
~463

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Glob, Grep, Write, Edit, Bash

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dev-toolings/superpowers-symfony at commit 459bcd0, republished under its MIT licence (© dev-toolings). 203 words, ~463 tokens.

Download SKILL.mdSave it as .claude/skills/doctrine-transactions/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
doctrine-transactions
description
Handle Doctrine transactions (ORM 3 wrapInTransaction), optimistic/pessimistic locking, flush strategies, and transaction boundaries
allowed-tools
Read, Glob, Grep, Write, Edit, Bash
capabilities
read, search, edit, shell
tags
doctrine

Doctrine Transactions (Symfony)

Use when

  • Several writes must succeed or fail together.
  • Two users or workers can edit the same row concurrently.
  • Deciding where to flush and who owns the transaction boundary.
  • Recovering after a failed flush, a constraint violation, or a lost connection.

Default workflow

  1. Place the transaction boundary in the service layer, not in the controller.
  2. Group related changes and flush once, inside wrapInTransaction().
  3. Pick the concurrency strategy: #[ORM\Version] optimistic locking for edits, PESSIMISTIC_WRITE for short critical sections.
  4. Handle OptimisticLockException and constraint violations explicitly.
  5. After a rollback, clear the EntityManager and re-fetch what you still need.

Guardrails

  • On ORM 3, EntityManager::transactional() is gone: use wrapInTransaction().
  • Outside an explicit transaction each flush commits on its own, so avoid several flushes per operation.
  • Keep transactions and pessimistic locks short; no HTTP calls or mail inside.
  • Do not reuse entities from a failed unit of work.

Progressive disclosure

  • Use this file for execution posture and risk controls.
  • Open references when deep implementation details are needed.

Output contract

  • Transaction boundaries with a single flush per operation.
  • The locking strategy chosen per entity, and how conflicts reach the user.
  • Rollback handling and the state of the EntityManager after it.

References

  • reference.md

© dev-toolings, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in content/skills/doctrine-transactions of dev-toolings/superpowers-symfony.

  • SKILL.md
  • reference.md

Open the folder on GitHubat commit 459bcd0

Compare with similar skills

Doctrine Transactions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Doctrine Transactions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Doctrine Transactions this skilldev-toolings/superpowers-symfony222—~463Automated safety check: NotesMIT
Content Create Hero Imageprisma/web1.1k—~6.9kAutomated safety check: PassNone
Sea Orm 2FlyinPancake/yoink112—~2.9kAutomated safety check: PassApache-2.0
Prisma Client APIcurvenote/curvenote1692 repos~1.6kAutomated safety check: PassMIT
DB Migratesimstudioai/sim30k—~2kAutomated safety check: PassApache-2.0
Specromeerez/orchid-orm543—~2kAutomated safety check: PassMIT

Similar skills

  • Official

    A skill your agent uses when the operator wants a hero or meta image for a Prisma blog post; asks to create or generate a blog hero, cover, social card, Open Graph, or YouTube image; mentions cover…

    1.1k GitHub stars~6.9k tokensUpdated today
    DatabasesAuto-check passed
  • Sea Orm 2

    FlyinPancake/yoink

    Expert guidance for SeaORM 2.0, Rust's async ORM with strongly-typed columns, nested ActiveModels, Entity Loader API, and entity-first workflow.

    112 GitHub stars~2.9k tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • Prisma Client API

    curvenote/curvenote

    Prisma Client API reference covering model queries, filters, operators, and client methods.

    169 GitHub starsUsed in 2 repos~1.6k tokens
    DatabasesAuto-check passed
  • DB Migrate

    simstudioai/sim

    Author or review a Drizzle DB migration for zero-downtime safety — expand/contract phasing, backward-compatibility with the deployed app version, and writing the -- migration-safe acknowledgment the…

    30k GitHub stars~2k tokensUpdated today
    DatabasesAuto-check passed
  • Spec

    romeerez/orchid-orm

    A skill your agent uses when the user prompts "write spec" or "make spec".

    543 GitHub stars~2k tokensUpdated yesterday
    DatabasesAuto-check passed
  • DB Migrations

    kurealnum/dotfiles

    A skill your agent uses when generating or regenerating Drizzle migration files, changing database schema tables or columns, resolving migration sequence conflicts after rebase, reviewing migration…

    290 GitHub stars~820 tokensUpdated 5 mo ago
    DatabasesAuto-check passed

More from dev-toolings/superpowers-symfony

All 44 skills in this repo
  • Symfony Scheduler

    dev-toolings/superpowers-symfony

    Schedule recurring tasks with the Symfony Scheduler component (native since 7.x); define schedules, triggers, and integrate with Messenger

    222 GitHub stars~526 tokensUpdated 3 days ago
    Auto-check: notes
  • API Platform Dto Resources

    dev-toolings/superpowers-symfony

    Map entities to API DTOs in API Platform (v5, 4.4, 4.3) with the Symfony Object Mapper ([Map], stateOptions) for decoupled input/output contracts

    222 GitHub stars~593 tokensUpdated 3 days ago
    Auto-check: notes
  • API Platform Filters

    dev-toolings/superpowers-symfony

    Implement API Platform filters - Parameters API (QueryParameter, v5/4.4/4.3) and the [ApiFilter] attribute deprecated since 4.4 - for search, date, range, boolean, and custom filtering

    222 GitHub stars~610 tokensUpdated 3 days ago
    Auto-check: notes
  • API Platform Resources

    dev-toolings/superpowers-symfony

    Configure API Platform resources (v5, 4.4, 4.3) with explicit operations, pagination, and typed OpenAPI for clean, versioned REST/GraphQL APIs

    222 GitHub stars~560 tokensUpdated 3 days ago
    Auto-check: notes
  • API Platform Security

    dev-toolings/superpowers-symfony

    Secure API Platform resources with security expressions, voters, securityPostValidation, and operation-level access control

    222 GitHub stars~551 tokensUpdated 3 days ago
    Auto-check: notes
  • API Platform Serialization

    dev-toolings/superpowers-symfony

    Control API Platform serialization with groups, [Context], IRI links (readableLink/writableLink), and custom context builders

    222 GitHub stars~519 tokensUpdated 3 days ago
    Auto-check: notes

Categories

Questions about Doctrine Transactions

What does Doctrine Transactions do?

Handle Doctrine transactions (ORM 3 wrapInTransaction), optimistic/pessimistic locking, flush strategies, and transaction boundaries. Doctrine Transactions is an agent skill from dev-toolings/superpowers-symfony.

When should I use Doctrine Transactions?

Doctrine Transactions fits situations like: tasks that involve ORMs and data access.

How do I install Doctrine Transactions in Claude Code?

Run `npx skills add dev-toolings/superpowers-symfony --skill doctrine-transactions -a claude-code`. Or copy the skill folder (content/skills/doctrine-transactions in dev-toolings/superpowers-symfony) into .claude/skills/doctrine-transactions in your project. Claude Code loads it when a task matches its description.

How do I install Doctrine Transactions in Codex?

Run `npx skills add dev-toolings/superpowers-symfony --skill doctrine-transactions -a codex`. Or copy the skill folder (content/skills/doctrine-transactions in dev-toolings/superpowers-symfony) into .agents/skills/doctrine-transactions in your project. Codex loads it when a task matches its description.

Can I use Doctrine Transactions in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dev-toolings/superpowers-symfony --skill doctrine-transactions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/doctrine-transactions, .gemini/skills/doctrine-transactions, .github/skills/doctrine-transactions and .opencode/skills/doctrine-transactions in your project.

What does Doctrine Transactions need to run?

SKILL.md names no scripts, command-line tools or credentials: Doctrine Transactions is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Glob, Grep, Write, Edit, Bash.

Does Doctrine Transactions access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Doctrine Transactions safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Doctrine Transactions use?

Doctrine Transactions is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Doctrine Transactions use?

About 463 tokens (SKILL.md is roughly 1.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Doctrine Transactions?

Skills that share tags, products or a category with Doctrine Transactions: Content Create Hero Image (prisma/web, 1.1k stars), Sea Orm 2 (FlyinPancake/yoink, 112 stars), Prisma Client API (curvenote/curvenote, 169 stars) and DB Migrate (simstudioai/sim, 30k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Doctrine Transactions?

dev-toolings (a GitHub organization) maintains it in dev-toolings/superpowers-symfony, which has 222 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on October 5, 2026.

Source: dev-toolings/superpowers-symfony on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.