{"id":"6976625d-cbfa-4f06-b7e5-a6bd74a90c07","shortId":"sKSDEr","kind":"skill","title":"magento-module-developer","tagline":"Creates robust, maintainable, and extensible Magento 2 modules following enterprise architecture patterns. Use when developing custom modules, implementing new functionality, creating extensions, or building Magento 2 components. Masters dependency injection, service contracts, r","description":"# Magento 2 Module Developer\n\nExpert specialist in creating well-architected, maintainable, and extensible Magento 2 modules that seamlessly integrate with Magento's core framework following Adobe Commerce best practices.\n\n## When to Use\n\n- Creating new Magento 2 modules or extensions\n- Implementing custom functionality\n- Building module architecture and structure\n- Setting up module dependencies and configuration\n- Implementing service contracts and APIs\n- Creating database schemas and data patches\n\n## Module Development Process\n\n### 1. Planning & Architecture\n- **Requirements Analysis**: Break down functional and non-functional requirements\n- **Architecture Design**: Plan module structure and integration points\n- **Database Design**: Design entity relationships and data flow\n- **API Design**: Define service contracts and data transfer objects\n- **Performance Considerations**: Plan for scalability and optimization\n\n### 2. Module Setup\n- **Module Structure**: Create proper directory structure following Magento conventions:\n  ```\n  app/code/Vendor/ModuleName/\n  ├── etc/\n  │   ├── module.xml\n  │   ├── di.xml\n  │   ├── routes.xml\n  │   ├── system.xml\n  │   ├── acl.xml\n  │   └── db_schema.xml\n  ├── Model/\n  ├── Block/\n  ├── Controller/\n  ├── Api/\n  ├── view/\n  └── registration.php\n  ```\n- **Registration**: Create `registration.php` and `composer.json`\n- **Module Declaration**: Create `etc/module.xml` with proper dependencies\n- **Version Control**: Set up Git with proper `.gitignore`\n\n### 3. Core Implementation\n\n#### Models & Entities\n- Entity models extending `Magento\\Framework\\Model\\AbstractModel`\n- Resource models extending `Magento\\Framework\\Model\\ResourceModel\\Db\\AbstractDb`\n- Collections extending `Magento\\Framework\\Model\\ResourceModel\\Db\\Collection\\AbstractCollection`\n- Use `db_schema.xml` for database schema definitions\n\n#### Repositories\n- Implement repository pattern for data access\n- Create repository interfaces in `Api/` directory\n- Implement repositories in `Model/` directory\n- Use service contracts for clean API interfaces\n\n#### Service Classes\n- Business logic in service classes\n- Use dependency injection for all dependencies\n- Implement service contracts for extensibility\n\n#### Controllers\n- Frontend controllers extending `Magento\\Framework\\App\\Action\\Action`\n- Admin controllers extending `Magento\\Backend\\App\\Action`\n- API controllers implementing service contracts\n\n### 4. Configuration Files\n\n#### module.xml\n```xml\n<?xml version=\"1.0\"?>\n<config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n        xsi:noNamespaceSchemaLocation=\"urn:magento:framework:Module/etc/module.xsd\">\n    <module name=\"Vendor_ModuleName\" setup_version=\"1.0.0\">\n        <sequence>\n            <module name=\"Magento_Store\"/>\n        </sequence>\n    </module>\n</config>\n```\n\n#### di.xml\n- Configure dependency injection\n- Define preferences, virtual types, plugins\n- Use proper scope (global, frontend, adminhtml, webapi_rest, webapi_soap)\n\n#### db_schema.xml\n- Define database tables, columns, indexes\n- Use proper data types and constraints\n- Follow Magento naming conventions\n\n## Design Patterns & Principles\n\n### Service Contracts\n- Create interfaces in `Api/` directory\n- Implement clean API interfaces\n- Use data transfer objects (DTOs) for data exchange\n- Maintain backward compatibility\n\n### Repository Pattern\n- Separate data access from business logic\n- Use repositories for all data operations\n- Implement proper error handling\n- Support transactions where needed\n\n### Dependency Injection\n- Use constructor injection only\n- Avoid service locator pattern\n- Leverage Magento's DI container\n- Use type hints for all dependencies\n\n### Plugin System\n- Use plugins to extend functionality\n- Prefer before/after plugins over around plugins\n- Avoid around plugins unless necessary\n- Document plugin execution order\n\n### Event/Observer Pattern\n- Dispatch events for extensibility\n- Implement observers for loose coupling\n- Use proper event naming conventions\n- Document event data structure\n\n## Module Components\n\n### Backend Components\n- **Models**: Entity models, resource models, collections\n- **Repositories**: Data access layer implementations\n- **Services**: Business logic and application services\n- **Controllers**: Admin controllers and API endpoints\n- **Blocks**: Admin interface building blocks\n- **UI Components**: Admin grids, forms, and components\n\n### Frontend Components\n- **Controllers**: Frontend page controllers and actions\n- **Blocks**: View logic and data preparation\n- **Templates**: PHTML template files with proper escaping\n- **Layout Files**: XML layout configurations\n- **JavaScript**: Frontend interaction and AJAX functionality\n- **CSS/LESS**: Styling and responsive design\n\n### Database Components\n- **db_schema.xml**: Database schema definitions\n- **Data Patches**: Data migration and setup scripts\n- **Schema Patches**: Database structure modifications\n- **Indexers**: Custom search and filter indexers\n\n## Advanced Features\n\n### API Development\n- Create REST endpoints with proper authentication\n- Implement GraphQL resolvers and schemas\n- Design clean API interfaces\n- Implement rate limiting and security measures\n\n### Event System Integration\n- Dispatch custom events for extensibility\n- Implement event observers\n- Create before/after/around plugins\n- Use virtual types for flexibility\n\n### Caching & Performance\n- Implement custom cache types and tags\n- Handle cache invalidation properly\n- Use lazy loading for expensive operations\n- Optimize database queries and joins\n\n### Multi-Store Support\n- Handle multi-store configurations\n- Implement proper configuration scopes\n- Ensure proper data separation\n- Support store context switching\n\n## Best Practices\n\n### Code Quality\n- Follow PSR-12 and Magento coding standards\n- Use `declare(strict_types=1);` in all PHP files\n- Implement comprehensive type hinting\n- Write unit and integration tests\n- Maintain high code coverage\n\n### Security\n- Implement input validation\n- Use proper output escaping in templates\n- Implement CSRF protection\n- Enforce proper access control (ACL)\n- Handle sensitive data appropriately\n\n### Performance\n- Optimize database queries\n- Use proper indexes\n- Implement caching strategies\n- Monitor memory usage\n- Optimize collection loading\n\n### Extensibility\n- Provide extension points via plugins\n- Dispatch events for third-party integration\n- Allow configuration without code changes\n- Use interface segregation\n- Maintain backward compatibility\n\n## Testing\n\n- **Unit Tests**: Test individual classes and methods\n- **Integration Tests**: Test module integration with core\n- **Functional Tests**: End-to-end test scenarios\n- **Static Analysis**: Use PHPStan/Psalm for code quality\n\n## Documentation\n\n- Technical documentation for developers\n- User documentation for end users\n- API documentation for all public APIs\n- Installation guides\n- Troubleshooting guides\n\n## References\n\n- [Adobe Commerce Extension Development](https://developer.adobe.com/commerce/php/development/)\n- [Coding Standards](https://developer.adobe.com/commerce/php/coding-standards/)\n- [Best Practices](https://developer.adobe.com/commerce/php/best-practices/)\n\nFocus on creating modules that are maintainable, extensible, and aligned with Magento's enterprise-grade architecture principles.","tags":["magento","module","developer","magento2","agent","skills","maxnorm","agent-skills"],"capabilities":["skill","source-maxnorm","skill-magento-module-developer","topic-agent-skills","topic-magento2"],"categories":["magento2-agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/maxnorm/magento2-agent-skills/magento-module-developer","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add maxnorm/magento2-agent-skills","source_repo":"https://github.com/maxnorm/magento2-agent-skills","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 9 github stars · SKILL.md body (7,316 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:08:49.976Z","embedding":null,"createdAt":"2026-05-07T20:42:23.298Z","updatedAt":"2026-05-18T19:08:49.976Z","lastSeenAt":"2026-05-18T19:08:49.976Z","tsv":"'-12':641 '/commerce/php/best-practices/)':797 '/commerce/php/coding-standards/)':792 '/commerce/php/development/)':787 '1':106,650 '2':11,30,39,53,74,151 '3':197 '4':297 'abstractcollect':226 'abstractdb':217 'abstractmodel':208 'access':239,366,459,683 'acl':685 'acl.xml':169 'action':283,284,291,493 'admin':285,469,475,481 'adminhtml':316 'adob':64,781 'advanc':547 'ajax':516 'align':807 'allow':719 'analysi':110,754 'api':96,135,174,244,256,292,345,349,472,549,564,770,775 'app':282,290 'app/code/vendor/modulename':163 'applic':466 'appropri':689 'architect':48 'architectur':15,83,108,119,814 'around':416,419 'authent':556 'avoid':390,418 'backend':289,449 'backward':360,728 'before/after':413 'before/after/around':584 'best':66,635,793 'block':172,474,478,494 'break':111 'build':28,81,477 'busi':260,368,463 'cach':591,595,600,698 'chang':723 'class':259,264,735 'clean':255,348,563 'code':637,644,666,722,758,788 'collect':218,225,456,704 'column':325 'commerc':65,782 'compat':361,729 'compon':31,448,450,480,485,487,524 'composer.json':181 'comprehens':656 'configur':91,298,303,511,622,625,720 'consider':145 'constraint':332 'constructor':387 'contain':398 'context':633 'contract':36,94,139,253,273,296,341 'control':173,190,276,278,286,293,468,470,488,491,684 'convent':162,336,442 'core':61,198,744 'coupl':437 'coverag':667 'creat':5,25,45,71,97,156,178,184,240,342,551,583,800 'csrf':679 'css/less':518 'custom':20,79,542,576,594 'data':101,133,141,238,329,352,357,365,374,445,458,498,529,531,629,688 'databas':98,127,230,323,523,526,538,610,692 'db':216,224 'db_schema.xml':170,228,321,525 'declar':183,647 'defin':137,306,322 'definit':232,528 'depend':33,89,188,266,270,304,384,404 'design':120,128,129,136,337,522,562 'develop':4,19,41,104,550,764,784 'developer.adobe.com':786,791,796 'developer.adobe.com/commerce/php/best-practices/)':795 'developer.adobe.com/commerce/php/coding-standards/)':790 'developer.adobe.com/commerce/php/development/)':785 'di':397 'di.xml':166,302 'directori':158,245,250,346 'dispatch':429,575,712 'document':423,443,760,762,766,771 'dtos':355 'end':748,750,768 'end-to-end':747 'endpoint':473,553 'enforc':681 'ensur':627 'enterpris':14,812 'enterprise-grad':811 'entiti':130,201,202,452 'error':378 'escap':506,675 'etc':164 'etc/module.xml':185 'event':430,440,444,572,577,581,713 'event/observer':427 'exchang':358 'execut':425 'expens':607 'expert':42 'extend':204,211,219,279,287,410 'extens':9,26,51,77,275,432,579,706,708,783,805 'featur':548 'file':299,503,508,654 'filter':545 'flexibl':590 'flow':134 'focus':798 'follow':13,63,160,333,639 'form':483 'framework':62,206,213,221,281 'frontend':277,315,486,489,513 'function':24,80,113,117,411,517,745 'git':193 'gitignor':196 'global':314 'grade':813 'graphql':558 'grid':482 'guid':777,779 'handl':379,599,618,686 'high':665 'hint':401,658 'implement':22,78,92,199,234,246,271,294,347,376,433,461,557,566,580,593,623,655,669,678,697 'index':326,541,546,696 'individu':734 'inject':34,267,305,385,388 'input':670 'instal':776 'integr':57,125,574,662,718,738,742 'interact':514 'interfac':242,257,343,350,476,565,725 'invalid':601 'javascript':512 'join':613 'layer':460 'layout':507,510 'lazi':604 'leverag':394 'limit':568 'load':605,705 'locat':392 'logic':261,369,464,496 'loos':436 'magento':2,10,29,38,52,59,73,161,205,212,220,280,288,334,395,643,809 'magento-module-develop':1 'maintain':7,49,359,664,727,804 'master':32 'measur':571 'memori':701 'method':737 'migrat':532 'model':171,200,203,207,210,214,222,249,451,453,455 'modif':540 'modul':3,12,21,40,54,75,82,88,103,122,152,154,182,447,741,801 'module.xml':165,300 'monitor':700 'multi':615,620 'multi-stor':614,619 'name':335,441 'necessari':422 'need':383 'new':23,72 'non':116 'non-funct':115 'object':143,354 'observ':434,582 'oper':375,608 'optim':150,609,691,703 'order':426 'output':674 'page':490 'parti':717 'patch':102,530,537 'pattern':16,236,338,363,393,428 'perform':144,592,690 'php':653 'phpstan/psalm':756 'phtml':501 'plan':107,121,146 'plugin':310,405,408,414,417,420,424,585,711 'point':126,709 'practic':67,636,794 'prefer':307,412 'prepar':499 'principl':339,815 'process':105 'proper':157,187,195,312,328,377,439,505,555,602,624,628,673,682,695 'protect':680 'provid':707 'psr':640 'public':774 'qualiti':638,759 'queri':611,693 'r':37 'rate':567 'refer':780 'registr':177 'registration.php':176,179 'relationship':131 'repositori':233,235,241,247,362,371,457 'requir':109,118 'resolv':559 'resourc':209,454 'resourcemodel':215,223 'respons':521 'rest':318,552 'robust':6 'routes.xml':167 'scalabl':148 'scenario':752 'schema':99,231,527,536,561 'scope':313,626 'script':535 'seamless':56 'search':543 'secur':570,668 'segreg':726 'sensit':687 'separ':364,630 'servic':35,93,138,252,258,263,272,295,340,391,462,467 'set':86,191 'setup':153,534 'skill' 'skill-magento-module-developer' 'soap':320 'source-maxnorm' 'specialist':43 'standard':645,789 'static':753 'store':616,621,632 'strategi':699 'strict':648 'structur':85,123,155,159,446,539 'style':519 'support':380,617,631 'switch':634 'system':406,573 'system.xml':168 'tabl':324 'tag':598 'technic':761 'templat':500,502,677 'test':663,730,732,733,739,740,746,751 'third':716 'third-parti':715 'topic-agent-skills' 'topic-magento2' 'transact':381 'transfer':142,353 'troubleshoot':778 'type':309,330,400,588,596,649,657 'ui':479 'unit':660,731 'unless':421 'usag':702 'use':17,70,227,251,265,311,327,351,370,386,399,407,438,586,603,646,672,694,724,755 'user':765,769 'valid':671 'version':189 'via':710 'view':175,495 'virtual':308,587 'webapi':317,319 'well':47 'well-architect':46 'without':721 'write':659 'xml':301,509","prices":[{"id":"c21f5046-5299-4c78-8b79-bc2ceba99e43","listingId":"6976625d-cbfa-4f06-b7e5-a6bd74a90c07","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"maxnorm","category":"magento2-agent-skills","install_from":"skills.sh"},"createdAt":"2026-05-07T20:42:23.298Z"}],"sources":[{"listingId":"6976625d-cbfa-4f06-b7e5-a6bd74a90c07","source":"github","sourceId":"maxnorm/magento2-agent-skills/magento-module-developer","sourceUrl":"https://github.com/maxnorm/magento2-agent-skills/tree/main/skills/magento-module-developer","isPrimary":false,"firstSeenAt":"2026-05-18T13:14:29.408Z","lastSeenAt":"2026-05-18T19:08:49.976Z"},{"listingId":"6976625d-cbfa-4f06-b7e5-a6bd74a90c07","source":"skills_sh","sourceId":"maxnorm/magento2-agent-skills/magento-module-developer","sourceUrl":"https://skills.sh/maxnorm/magento2-agent-skills/magento-module-developer","isPrimary":true,"firstSeenAt":"2026-05-07T20:42:23.298Z","lastSeenAt":"2026-05-07T22:41:34.444Z"}],"details":{"listingId":"6976625d-cbfa-4f06-b7e5-a6bd74a90c07","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"maxnorm","slug":"magento-module-developer","github":{"repo":"maxnorm/magento2-agent-skills","stars":9,"topics":["agent-skills","magento2"],"license":"mit","html_url":"https://github.com/maxnorm/magento2-agent-skills","pushed_at":"2026-01-24T16:45:35Z","description":"A collection of specialized agent skills for Magento 2 development, designed to provide domain expertise across all aspects of Magento/Adobe Commerce development workflows. ","skill_md_sha":"7d02cd5beacea3eb5f1410c3dd923108c8cbb9a9","skill_md_path":"skills/magento-module-developer/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/maxnorm/magento2-agent-skills/tree/main/skills/magento-module-developer"},"layout":"multi","source":"github","category":"magento2-agent-skills","frontmatter":{"name":"magento-module-developer","description":"Creates robust, maintainable, and extensible Magento 2 modules following enterprise architecture patterns. Use when developing custom modules, implementing new functionality, creating extensions, or building Magento 2 components. Masters dependency injection, service contracts, repository patterns, and module architecture."},"skills_sh_url":"https://skills.sh/maxnorm/magento2-agent-skills/magento-module-developer"},"updatedAt":"2026-05-18T19:08:49.976Z"}}