From magento2-commerce
Guides creation of Magento 2 custom modules: registration, directory structure, models, resource models, collections, declarative schema, data/schema patches. For building modules or reviewing architecture.
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin magento2-commerceThis skill is limited to using the following tools:
**Fetch live docs**:
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Fetch live docs:
https://developer.adobe.com/commerce/php/development/build/component-file-structure/ for module structurehttps://developer.adobe.com/commerce/php/development/ for development overviewsite:developer.adobe.com commerce php development build for build guidesapp/code/VendorName/ModuleName/
├── Api/ # Service contract interfaces
│ └── Data/ # Data interfaces
├── Block/ # View blocks
├── Console/ # CLI commands
├── Controller/ # Controllers
│ └── Adminhtml/ # Admin controllers
├── Cron/ # Cron job classes
├── etc/ # Configuration XML
│ ├── adminhtml/ # Admin-area configs
│ ├── frontend/ # Frontend configs
│ ├── module.xml # Module declaration
│ ├── di.xml # Dependency injection
│ ├── db_schema.xml # Declarative schema
│ └── db_schema_whitelist.json
├── Helper/ # Utility classes
├── Model/ # Models
│ └── ResourceModel/ # Resource models + collections
├── Observer/ # Event observers
├── Plugin/ # Interceptor classes
├── Setup/
│ └── Patch/
│ ├── Data/ # Data patches
│ └── Schema/ # Schema patches
├── Test/ # Tests
├── ViewModel/ # MVVM view models
├── view/ # Templates, layouts, JS, CSS
├── registration.php # Module registration
└── composer.json # Composer definition
Registers the module with Magento's component registrar. Uses ComponentRegistrar::register() with type MODULE.
Declares the module name and sequence dependencies (modules that must load before this one).
Package definition with type magento2-module, PSR-4 autoload mapping, and Magento module dependencies.
AbstractModel, represents a single entity, _construct() initializes resource modelAbstractDb, handles CRUD against a specific table, _init() sets table and primary keyAbstractCollection, represents a set of models, _init() maps model to resource modelSince Magento 2.3+, database schema is declared in XML rather than install/upgrade scripts. The system computes diffs and applies changes automatically on setup:upgrade.
DataPatchInterface or SchemaPatchInterfaceapply() method contains the migration logicpatch_list tableConsole commands extend Symfony\Component\Console\Command\Command:
etc/di.xml as arguments to Magento\Framework\Console\CommandListInterfaceconfigure() for name/description and execute() for logicVendorName_ModuleName naming conventionmodule.xml sequenceApi/Fetch the component file structure guide for exact directory conventions and required files before creating a module.