symfony-messenger — Claude Code skill: what it does, how to install
A skill for async message handling with Symfony Messenger: configures transports, handlers, and retry strategies.
MIT ★ 234 updated 2026-10-05
npx skills add dev-toolings/superpowers-symfony --skill symfony-messenger -a claude-codeWhat symfony-messenger does
The skill helps move slow or risky work out of HTTP requests into a queue. You create a message class with IDs (not Doctrine entities), write a handler with the #[AsMessageHandler] attribute, route the message to a transport (Doctrine, Redis, AMQP, sync://, or in-memory://), and start a worker with messenger:consume.
Handlers must be idempotent: delivery is at-least-once, so a redelivered message should not break data. The skill defines retry policies, failure transport settings, and commands to verify wiring with debug:messenger and messenger:stats. Without restarting workers after deploy (messenger:stop-workers), new code will not apply.
In tests, use the in-memory:// transport to check logic without external dependencies. For workers, set limits by memory (--memory-limit), time (--time-limit), or message count (--limit).
What it helps with
- move slow work out of HTTP requests into a background handler
- configure a transport for RabbitMQ, Redis, or Doctrine and route messages to it
- write an idempotent handler that survives redelivery without breaking data
- define a retry strategy and failure transport for messages that fail
- verify the configuration and run a worker with resource limits
Example prompts for the agent
- Create a
SendInvoiceEmailmessage class withorderIdandrecipientEmailfields, a handler with#[AsMessageHandler], and route it to theasynctransport via Doctrine. - Set up
retry_strategyfor theasynctransport: three attempts with delays of 5, 15, and 60 seconds, and send tofailure_transportafter exhaustion. - Run
messenger:consume async -vvwith a limit of 100 messages and outputdebug:messengerto verify wiring.
How to install symfony-messenger
1Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill symfony-messenger -a claude-code2Manually: put the files in place
~/.claude/skills/symfony-messenger/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/symfony-messenger/
1Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill symfony-messenger -a codex2Manually: put the files in place
.agents/skills/symfony-messenger/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill symfony-messenger -a cursor2Manually: put the files in place
.cursor/skills/symfony-messenger/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dev-toolings/superpowers-symfony content/skills/symfony-messenger2Manually: put the files in place
.github/skills/symfony-messenger/SKILL.md1Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill symfony-messenger -a gemini-cli2Platform CLI
gemini skills install https://github.com/dev-toolings/superpowers-symfony --path content/skills/symfony-messengerManually: put the files in place
.devin/skills/symfony-messenger/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about symfony-messenger
How to install symfony-messenger in Claude Code?
Run npx skills add dev-toolings/superpowers-symfony --skill symfony-messenger -a claude-code, then open ~/.claude/skills/symfony-messenger/SKILL.md.
What does symfony-messenger do?
The skill helps work with Symfony Messenger: create messages and handlers, configure transports and retry strategies, run workers, and verify configuration.
Why cannot I pass Doctrine entities in messages?
Proxies and detached state do not serialize cleanly. Pass IDs and refetch entities in the handler by ID.
Source text
SKILL.md · MIT
---
name: symfony-messenger
description: Async message handling with Symfony Messenger; configure transports (RabbitMQ, Redis, Doctrine); implement handlers, middleware, and retry strategies
capabilities: [read, search, edit, shell]
tags: [messenger]
# projected by `bun run build` — do not edit by hand
allowed-tools:
- Read
- Glob
- Grep
- Write
- Edit
- Bash
---
# Symfony Messenger (Symfony)
## Use when
- Moving slow or failure-prone work out of the request into a message and an `#[AsMessageHandler]` handler.
- Choosing a transport (Doctrine, Redis, AMQP, `sync://`, `in-memory://`) and routing messages to it.
- Running, sizing, and restarting workers with `messenger:consume`.
- Making handlers safe under redelivery.
## Default workflow
1. Create the message as a plain `readonly` class that carries IDs, never entities.
2. Write the handler with `#[AsMessageHandler]` and a typed `__invoke()`: refetch by ID, skip work already done.
3. Route the message with `#[AsMessage('async')]` or the `routing` key, and declare the transport DSN in `messenger.yaml`.
4. Set `retry_strategy` and `failure_transport` on the transport.
5. Consume with `messenger:consume async -vv`, bounded by `--limit`, `--memory-limit`, or `--time-limit`.
6. Check the wiring with `debug:messenger` and `messenger:stats`, and use `in-memory://` in tests.
## Guardrails
- Pass entity IDs, never Doctrine entities: proxies and detached state do not serialize cleanly.
- Delivery is at-least-once: a redelivered message must return quietly, not throw.
- `PriorityStamp`, `--fetch-size`, `--no-reset`, and `stop_worker_on_signals` are marked 8.1+ in the reference: verify the minimum version first.
- Restart workers on deploy with `messenger:stop-workers`.
## Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.
## Output contract
- The message, its handler, and the routing and transport configuration.
- The retry and failure transport settings.
- The worker command, and the `debug:messenger` or `messenger:stats` output that proves the wiring.
## References
- `reference.md`
© dev-toolings · MIT · dev-toolings/superpowers-symfony