In short.
Controller Cleanup is an assistant skill for Symfony developers simplifying controllers and console commands, but its worked example does not preserve every visible HTTP detail. It provides a structured workflow, responsibility boundaries and PHP examples. The example changes a route and coupon input field, while its sample test checks only a successful status code. The skill declares reading and searching tools; editing and test execution are outside that declaration. No code or validation commands were run, so compatibility and behavior preservation remain unverified.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the full supplied content/skills/controller-cleanup/SKILL.md and reference.md at revision 83522d88f20313c1db6f042a5a49c0e9e0b258b1, together with the captured repository root LICENSE. Other repository skills, build tooling, installation documentation, dependency implementations and release history are outside the supplied scope. No code was executed, no commands were run and no assistant installation, HTTP behavior, asynchronous delivery, compatibility or performance was verified.
The overview
Identity
Controller Cleanup belongs to dev-toolings/superpowers-symfony. The selected resource consists of content/skills/controller-cleanup/SKILL.md and its companion reference.md. It supplies instructions and illustrative PHP, rather than an executable refactoring engine.
Original source: [https://github.com/dev-toolings/superpowers-symfony/tree/main/content/skills/controller-cleanup]. The supplied snapshot is pinned to revision 83522d88f20313c1db6f042a5a49c0e9e0b258b1.
Assessment
The strongest feature is its explicit sequence: identify responsibilities, cover existing HTTP behavior with a functional test, then extract focused components. It also warns against moving an overloaded controller wholesale into an equally overloaded service.
Use it as architectural guidance with project-specific implementation. Its reference does not demonstrate a behavior-preserving transformation: the example changes POST /orders to POST /api/orders and replaces the coupon input field with couponCode. Those changes matter to existing API clients.
Users
The skill fits developers maintaining Symfony actions that mix request parsing, validation, access checks, database work and notifications. It also addresses console commands that contain business logic instead of delegating it.
Beginners receive concrete examples of where responsibilities belong, but need familiarity with Symfony dependency injection, validation and functional testing. Experienced developers can use the workflow to plan incremental extractions and review responsibility boundaries.
Capabilities
The instructions cover request and query mapping, validation through data-transfer objects, service or handler extraction, authorization through voters, event or message dispatch, explicit dependency injection and thin console entry points. The intended outputs include extracted components and functional tests demonstrating unchanged HTTP behavior.
The declared capabilities are read and search, with Read, Glob and Grep listed as allowed tools. The files do not supply an editing tool, command runner or automatic code transformation. How a particular assistant enforces those declarations is unknown.
Using it
Requirements
The examples assume a Symfony application using attributes, dependency injection, request mapping and Validator constraints. Particular examples also depend on Doctrine entity resolution or persistence, Messenger-style message dispatch, application services and test factories.
The source explicitly requires Symfony 7.3 or later for the illustrated invokable console command without a Command base class. It does not establish a minimum version for the entire skill, a PHP compatibility matrix or supported assistant hosts. PHPUnit and PHPStan must be available if the suggested checks are to be used.
Mechanism
The workflow first separates input, validation, authorization, business rules, persistence and side effects. After establishing functional coverage, it maps input into a DTO, meaning a data-transfer object that carries request values and validation rules. Business operations move into focused services or handlers, access decisions into voters and side effects into events or messages.
The controller then resolves input, checks authorization, delegates work and returns a response. Five to ten lines per action is the stated target. The reference adds entity lookup through EntityValueResolver or MapEntity and recommends constructor or action-argument injection instead of fetching services from the container.
Setup
The selected files provide no installation command, supported assistant list or activation syntax. Keep SKILL.md and reference.md together because the skill references its companion by relative filename. Consult the intended host's documentation for loading instructions and permission behavior.
Before applying the examples, identify the application's actual Symfony version, validation configuration, service wiring and test setup. Code edits and command execution require facilities beyond the skill's declared reading and searching tools.
Example
The main example starts with an order controller that parses JSON, checks products and stock, calculates totals, applies a coupon, persists an order and sends email. Its replacement accepts a CreateOrderRequest DTO and delegates to OrderService. That service coordinates product reservation, coupon application, persistence and notification.
This illustrates a responsibility split, not a complete application. ProductService, CouponService and OrderNotificationService implementations are omitted. The request's items property remains an array without a shown item DTO or element type, so item hydration and validation details are not established.
Assessment & evidence
Limitations
The source requires identical status codes and payloads, but the examples do not establish that result. Beyond the route and coupon-field changes, manual 400 responses are replaced with framework request mapping and validation without showing equivalent error responses. The sample functional test asserts only status 201, leaving response content, invalid inputs and authorization behavior uncovered.
Transaction boundaries, concurrent stock reservation, notification failure handling and message transport configuration are not shown. Message dispatch alone does not establish asynchronous delivery. Several snippets depend on omitted imports, collaborators or test initialization, so they require integration work before use.
The action-length checklist is an architectural preference, not evidence of correctness, maintainability or performance. No code or validation commands were run.
Reasoning
The proposed separation makes dependencies visible and allows HTTP actions and console commands to share application services. Moving validation and authorization into dedicated components also gives those rules identifiable locations for review and testing.
The useful criterion is whether each extracted component has a focused responsibility while the external contract remains stable. Merely reducing controller line count cannot establish either outcome. The source supplies architectural rationale and examples, but no measured productivity, defect-rate or performance results.
Alternatives
The resource itself offers several extraction targets: a focused service, command handler, authorization voter or event/message. Choose according to the responsibility being moved rather than introducing one general-purpose service for everything.
Developers can also apply the documented checklist manually without loading it into an assistant. The supplied material does not compare this skill with other assistant skills or automated refactoring tools, so relative effectiveness is unknown.
Evidence
The supplied evidence contains the complete selected SKILL.md and reference.md, plus the repository root LICENSE at the same revision. SKILL.md establishes the workflow and declared tools; reference.md supplies PHP examples, a checklist and suggested validation commands.
Original skill: [https://raw.githubusercontent.com/dev-toolings/superpowers-symfony/83522d88f20313c1db6f042a5a49c0e9e0b258b1/content/skills/controller-cleanup/SKILL.md]. Companion reference: [https://raw.githubusercontent.com/dev-toolings/superpowers-symfony/83522d88f20313c1db6f042a5a49c0e9e0b258b1/content/skills/controller-cleanup/reference.md]. These documents establish intended guidance, not successful execution or compatibility results.
Access & freshness
Costs
The MIT notice grants permission free of charge. The selected files do not specify assistant subscriptions, model usage charges, hosting costs or implementation effort. Total adoption and operating costs are unknown; no particular paid provider is named as a requirement.
Rights
The supplied root LICENSE is the MIT License. It permits use, copying, modification, publication, distribution, sublicensing and sale, provided the copyright and permission notice accompany copies or substantial portions of the software. It provides no warranty and disclaims liability.
Preserve the captured LICENSE with redistributed skill files. Original notice: [https://raw.githubusercontent.com/dev-toolings/superpowers-symfony/83522d88f20313c1db6f042a5a49c0e9e0b258b1/LICENSE].
Freshness
The supplied snapshot was captured on 17 November 2026 at 04:41:02.524 UTC and identifies revision 83522d88f20313c1db6f042a5a49c0e9e0b258b1. Publication date, last modification date, release label and subsequent changes are unknown.
The text explicitly mentions Symfony 7.3 or later for its invokable console pattern. That statement does not establish compatibility with every Symfony release or application configuration. The license's 2024 copyright date is not evidence of when the skill was last updated.
Actions
Start with one overloaded action and capture its route, request fields, status codes, response bodies, authorization decisions and side effects in functional tests before extracting responsibilities. Preserve the application's existing contract rather than copying the example's route and field changes.
Check the resulting DTO mapping, extracted services, persistence behavior and notification configuration. The reference suggests ./vendor/bin/phpunit --filter=Controller, php bin/console debug:router and ./vendor/bin/phpstan analyse src/Controller. These commands were not run; passing them would still need to be complemented by tests covering the actual API contract.
