make-decorator
Skill4 starsChanged 2 months agoMITView on GitHub
Use when an existing service's behavior must change without editing its class, such as adding caching, logging or a fallback around it.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cli-conventionsSkill
- componentsSkill
- configurationSkill
- discoverSkill
- make-ciSkill
- make-commandSkill
- make-controllerSkill
- make-crudSkill
- make-entitySkill
- make-formSkill
- make-listenerSkill
- make-migrationSkill
- make-registration-formSkill
- make-reset-passwordSkill
- make-security-customSkill
- make-security-form-loginSkill
- make-testSkill
- make-twig-extensionSkill
- make-userSkill
- make-voterSkill
- make-webhookSkill
- servicesSkill
- templatesSkill
The file
Files
Service decorator
symfony console make:decorator translator App\\Translation\\LoggingTranslatorBoth values are arguments: the id of the service to decorate, then the class to create.
Non-interactively the id must be exact. An interactive run guesses near misses and offers
a choice, a non-interactive run fails instead. symfony console debug:container lists the
ids. --priority orders multiple decorators on the same service.
What you get
A class marked #[AsDecorator('<id>')], a constructor that receives the decorated
service through #[AutowireDecorated], and one forwarding method per public method of the
decorated class. No configuration file changes: the attribute is the registration.
Change only the methods whose behavior should differ and leave the rest forwarding. A decorator that reimplements everything is a replacement, and then the honest move is a new service, not a decorator.
When to decorate
Decorating earns its place when the class is not yours to edit: a vendor service, a framework service, or a class other code depends on staying as it is. When you own the class and can change it, change it. A decorator around your own service adds indirection without buying anything.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

