magento2-backend-toolkit
Installation
SKILL.md
Magento 2 Backend Toolkit
General Rules
- All generated code MUST follow PSR-12 coding standard
- All PHP files MUST have
declare(strict_types=1); - Use strict type hints on all method parameters and return types
- Namespace follows:
Vendor\Module\Pathconvention - XML files must include proper XSD schema references
- Default Vendor name: ask user, suggest
Sampleif not specified - NEVER use ObjectManager directly — only use DI
- NEVER use constructor property promotion (
private readonlyin constructor params) — always declare properties explicitly above the constructor and assign them in the constructor body - ALL class properties MUST have a
@varPHPDoc block with the fully-qualified class name - ALL constructors MUST have a
@paramPHPDoc block with fully-qualified class names for each parameter - ALL public and protected methods MUST have a PHPDoc block with a short description and
@param/@returntags - Always create
composer.jsonwith new modules