Agent skill

Doctrine Events

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

React to Doctrine entity lifecycle in Symfony with attribute listeners ([AsDoctrineListener]/[AsEntityListener], ORM 3) and lifecycle callbacks

MITAuto-check: notesDatabases

Install Doctrine Events

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

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

GitHub CLI
$ gh skill install dev-toolings/superpowers-symfony doctrine-events --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-events .claude/skills/doctrine-events && 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-events
GitHub stars
223
Token cost
~485 tokens
SKILL.md length
189 words
Files
2
Skills in repo
44
Repo updated
First seen
Licence
MIT

At a glance

React to Doctrine entity lifecycle in Symfony with attribute listeners ([AsDoctrineListener]/[AsEntityListener], ORM 3) and lifecycle callbacks

  • Works in 4 steps: Pick the narrowest mechanism: callback… → Wire it with attributes… → Type the event argument by its per-event… → …
  • 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 Events is an agent skill from dev-toolings/superpowers-symfony. React to Doctrine entity lifecycle in Symfony with attribute listeners ([AsDoctrineListener]/[AsEntityListener], ORM 3) and lifecycle callbacks

Its SKILL.md is about 490 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. It works with Symfony and React. 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-events”

Requirements

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

Workflow steps

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

  1. Pick the narrowest mechanism: callback (one entity, no deps) → entity listener (one entity, needs services) → lifecycle listener…
  2. Wire it with attributes (#[ORM\HasLifecycleCallbacks], #[AsEntityListener], #[AsDoctrineListener]).
  3. Type the event argument by its per-event class (PostPersistEventArgs, PreUpdateEventArgs, …).
  4. Verify the side effect fires with a targeted functional test against a real DB.

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 Events loads about 485 tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 189 words of instructions outside code blocks.

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

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). 189 words, ~485 tokens.

Download SKILL.mdSave it as .claude/skills/doctrine-events/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
doctrine-events
description
React to Doctrine entity lifecycle in Symfony with attribute listeners (#[AsDoctrineListener]/#[AsEntityListener], ORM 3) and lifecycle callbacks
allowed-tools
Read, Glob, Grep, Write, Edit, Bash
capabilities
read, search, edit, shell
tags
doctrine

Doctrine Events (Symfony)

Use when

  • You need side effects on entity persistence (timestamps, slugs, search indexing, notifications).
  • Migrating an EventSubscriberInterface Doctrine subscriber to ORM 3.
  • Choosing between lifecycle callbacks, entity listeners, and global lifecycle listeners.

Default workflow

  1. Pick the narrowest mechanism: callback (one entity, no deps) → entity listener (one entity, needs services) → lifecycle listener (cross-cutting, all entities).
  2. Wire it with attributes (#[ORM\HasLifecycleCallbacks], #[AsEntityListener], #[AsDoctrineListener]).
  3. Type the event argument by its per-event class (PostPersistEventArgs, PreUpdateEventArgs, …).
  4. Verify the side effect fires with a targeted functional test against a real DB.

Guardrails

  • ORM 3.0 removed EventSubscriberInterface Doctrine subscribers — never reintroduce them.
  • Type-check the entity early in a global lifecycle listener (it fires for every entity).
  • Never call flush() inside a Doctrine event handler — it corrupts the in-flight unit of work.
  • preUpdate is restricted: change fields only via $args->setNewValue(), never touch associations.

Progressive disclosure

  • Use this file for execution posture and risk controls.
  • Open reference.md for the three mechanisms, the event-args matrix, and migration from subscribers.

Output contract

  • Listener/callback class with the correct attribute.
  • Justification for the chosen mechanism.
  • Validation outcomes (test that the side effect fired).

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-events of dev-toolings/superpowers-symfony.

  • SKILL.md
  • reference.md

Open the folder on GitHubat commit 459bcd0

Compare with similar skills

Doctrine Events 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 Events compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Doctrine Events this skilldev-toolings/superpowers-symfony223—~485Automated safety check: NotesMIT
Supercheck Architecturesupercheck-io/supercheck215—~1.3kAutomated safety check: PassAGPL-3.0
Context7 MCPrtadewald/skills185—~681Automated safety check: PassNone
Documentation Lookupaffaan-m/ECC276k1 repos~670Automated safety check: PassMIT
Context7 MCPdanielvm-git/bigpowers258—~603Automated safety check: PassMIT
Vite Flare Starterjezweb/claude-skills1.1k—~2.6kAutomated safety check: PassMIT

Similar skills

  • Supercheck Architecture

    supercheck-io/supercheck

    Work on Supercheck system architecture, Next.js routes and actions, React data hooks, Drizzle schemas and migrations, app-worker boundaries, or cross-package contracts.

    215 GitHub stars~1.3k tokensUpdated today
    DatabasesAuto-check passed
  • Context7 MCP

    rtadewald/skills

    This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples.

    185 GitHub stars~681 tokensUpdated 10 days ago
    DatabasesAuto-check passed
  • 通过 Context7 MCP 使用最新的库和框架文档,而非训练数据。当用户提出设置问题、API参考、代码示例或命名框架(例如 React、Next.js、Prisma)时激活。

    276k GitHub starsUsed in 1 repo~670 tokens
    DatabasesAuto-check passed
  • Context7 MCP

    danielvm-git/bigpowers

    Fetch current library docs via Context7 MCP instead of training data.

    258 GitHub stars~603 tokensUpdated 17 days ago
    DatabasesAuto-check passed
  • Vite Flare Starter

    jezweb/claude-skills

    Scaffold a full-stack Cloudflare app from the vite-flare-starter template — React 19 + Hono + D1+Drizzle + better-auth + Tailwind v4+shadcn/ui + TanStack Query + R2 + Workers AI.

    1.1k GitHub stars~2.6k tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • 訓練データの代わりにContext7 MCP経由で最新のライブラリとフレームワークドキュメント使用。セットアップの質問、APIリファレンス、コード例、またはユーザーがフレームワーク(例:React、Next.js、Prisma)に名前を付けるときにアクティベーション。

    276k GitHub stars~640 tokensUpdated 4 days 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

    223 GitHub stars~526 tokensUpdated 4 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

    223 GitHub stars~593 tokensUpdated 4 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

    223 GitHub stars~610 tokensUpdated 4 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

    223 GitHub stars~560 tokensUpdated 4 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

    223 GitHub stars~551 tokensUpdated 4 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

    223 GitHub stars~519 tokensUpdated 4 days ago
    Auto-check: notes

Works with

Categories

Questions about Doctrine Events

What does Doctrine Events do?

React to Doctrine entity lifecycle in Symfony with attribute listeners ([AsDoctrineListener]/[AsEntityListener], ORM 3) and lifecycle callbacks. Doctrine Events is an agent skill from dev-toolings/superpowers-symfony.

When should I use Doctrine Events?

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

How do I install Doctrine Events in Claude Code?

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

How do I install Doctrine Events in Codex?

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

Can I use Doctrine Events 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-events -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-events, .gemini/skills/doctrine-events, .github/skills/doctrine-events and .opencode/skills/doctrine-events in your project.

What does Doctrine Events need to run?

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

Does Doctrine Events 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 Events 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 Events use?

Doctrine Events 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 Events use?

About 485 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 Events?

Skills that share tags, products or a category with Doctrine Events: Supercheck Architecture (supercheck-io/supercheck, 215 stars), Context7 MCP (rtadewald/skills, 185 stars), Documentation Lookup (affaan-m/ECC, 276k stars) and Context7 MCP (danielvm-git/bigpowers, 258 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Doctrine Events?

dev-toolings (a GitHub organization) maintains it in dev-toolings/superpowers-symfony, which has 223 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.