create-frontend-controller
CommunityBuild Magento 2 frontend controllers faster.
System Documentation
What problem does it solve?
This Skill guides developers to implement a frontend controller action in Magento 2 for the storefront, covering routing, dependency injection, and response handling to ensure scalable, maintainable storefront logic.
Core Features & Use Cases
- Routing configuration via etc/frontend/routes.xml to expose the controller under a frontend URL.
- Dependency injection and avoidance of ObjectManager to create testable, robust controllers.
- Support for multiple response types (JSON, page, redirects) using appropriate Magento result factories.
- Encourages HTTP method discipline with HttpGetActionInterface and HttpPostActionInterface for storefront endpoints.
Quick Start
Create a minimal module with etc/frontend/routes.xml, implement a controller class under app/code/Vendor/ModuleName/Controller/Your/Action.php that implements HttpGetActionInterface (and optionally HttpPostActionInterface), wire up DI, and test the endpoint at /yourfrontname/controller/action.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: create-frontend-controller Download link: https://github.com/ProxiBlue/claude-skills/archive/main.zip#create-frontend-controller Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.