add-event-subscriber

add-event-subscriber is a skill for Claude Code, Codex from tarlepp/symfony-flex-backend. It costs 32 tokens per session (1,055 once invoked), scanned A, original, MIT.

A coding guide for creating or changing Symfony event subscribers. An event subscriber is a class that declares which application events it handles and which methods should run for them.

In plain words
What is it for?
Use it when adding or updating a Symfony subscriber, its event map, or its tests. It covers subscriber placement, autoconfiguration, callback methods, and event priorities.
Why use it?
It helps avoid incorrect event names, argument types, priorities, or service registration. It also provides repository-specific patterns and behavior tests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding or updating a Symfony subscriber, its event map, or its tests. It covers subscriber placement, autoconfiguration, callback methods, and event priorities.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tarlepp/symfony-flex-backend/add-event-subscriber
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 tarlepp/symfony-flex-backend --skill add-event-subscriber
Clone the repo
git clone --depth 1 https://github.com/tarlepp/symfony-flex-backend

Made for: Claude Code, Codex.

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 add-event-subscriber

README.md
[![agentmods](https://agentmods.dev/badge/skills/tarlepp/symfony-flex-backend/add-event-subscriber/github.svg)](https://agentmods.dev/skills/tarlepp/symfony-flex-backend/add-event-subscriber)
Your own site
<a href="https://agentmods.dev/skills/tarlepp/symfony-flex-backend/add-event-subscriber"><img src="https://agentmods.dev/badge/skills/tarlepp/symfony-flex-backend/add-event-subscriber/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-event-subscriber

Your own site · 80×15
<a href="https://agentmods.dev/skills/tarlepp/symfony-flex-backend/add-event-subscriber"><img src="https://agentmods.dev/badge/skills/tarlepp/symfony-flex-backend/add-event-subscriber.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,055 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.00032 $0.01055
Opus 5.5 $0.00013 $0.00422
Sonnet 5.5 $0.00006 $0.00211
Haiku 4.5 $0.00003 $0.00105

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

Security

Grade A, and why

add-event-subscriber 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.

.github/skills/add-event-subscriber/SKILL.md · 101 lines

How it starts

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

What is this?

Use this skill when creating or updating a Symfony event subscriber, its subscriptions, or its behavior.

Follow the shared skill guidance, including .github/copilot-instructions.md and doc/AI_RULES.md.

Table of Contents ᐞ

Workflow ᐞ

  1. Read composer.json, symfony.lock, the event dispatch sites or framework contracts, and nearby subscribers and tests. Confirm exact event names, argument types, timing, and the dispatcher used. Read the event-handling guide for the listener/subscriber decision.
  2. Extend an existing subscriber when the responsibility matches. For a new Symfony subscriber, place it in src/EventSubscriber/ and implement Symfony\Component\EventDispatcher\EventSubscriberInterface. Follow AcceptLanguageSubscriber for one event or LockedUserSubscriber for related authentication events. Keep unrelated concerns in separate services; one subscriber may legitimately handle just one event.
  3. Implement public static function getSubscribedEvents(): array with #[Override]. Map each dispatched event name to a public callback, using [method, priority] or multiple callback entries only when needed. Match existing typing conventions. Prefer the event class where the dispatcher supports it, but preserve bundle string event names and compatibility mappings when required by actual dispatch sites; do not blindly register both class and string names.
  4. Rely on the existing App\ service discovery and autoconfigure: true in config/services.yaml for normal Symfony subscriber registration. Do not add redundant kernel.event_listener tags or AsEventListener attributes to subscriber callbacks. If a dedicated dispatcher is required, inspect its registration mechanism rather than assuming the default dispatcher receives the event.
  5. Inject dependencies through the constructor, keep event adaptation thin, and delegate business behavior to resources or services. Keep all methods typed and request-specific state out of shared services. Account for app.stopwatch tagging and StopwatchCompilerPass; do not make the service readonly or bypass decoration just to simplify a test.
  6. Preserve existing subscriptions, priorities, callback names, propagation, and exception behavior unless the task changes them. Higher Symfony priorities run first. Inspect surrounding handlers before changing order, especially locale, authentication, response, and exception processing. Decide main-request/subrequest handling explicitly when relevant. Preserve security checks and never silently swallow handler failures.
  7. Do not confuse Symfony subscribers with Doctrine lifecycle subscriptions. DoctrineExtensionSubscriber reacts to a Symfony request event; its name does not make it a Doctrine subscriber. For ORM events, use .github/skills/add-event-listener/SKILL.md and the installed DoctrineBundle's supported listener registration instead of introducing legacy Doctrine subscribers.
  8. Follow .github/skills/write-tests/SKILL.md. Cover the exact subscription map, including priorities, as in tests/Unit/EventSubscriber/AcceptLanguageSubscriberTest.php, and observable handler behavior as in its integration tests. Also exercise the actual caller boundary for registration changes: dispatch through the container's appropriate dispatcher or make an HTTP request when kernel sequencing matters. Direct handler calls and subscription-map assertions alone cannot detect missing registration, wrong dispatcher, or duplicate execution. Cover relevant subrequests, no-op paths, invalid inputs, errors, ordering, and security outcomes.
  9. Update relevant event or API documentation when the change affects observable behavior or establishes a new subscription convention.

Read the full file on GitHub · 101 lines

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 · 101 lines · 32 tokens per session scan A f3d3be918280

Subscribe to this mod's changes

add-event-subscriber is a skill published in the GitHub repository tarlepp/symfony-flex-backend (288 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 1,055 once invoked, about $0.0001 per session on Opus 5.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-10-20.