hyva-create-module

Generates Magento 2 module boilerplate files including registration.php, composer.json, and etc/module.xml.

78|16|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/hyva-themes/hyva-ai-tools --skill hyva-create-module
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hyva-create-module
Source: https://github.com/hyva-themes/hyva-ai-tools/tree/main/skills/hyva-create-module
Command: npx skills add https://github.com/hyva-themes/hyva-ai-tools --skill hyva-create-module

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates scaffolding of Magento 2 modules by generating boilerplate files under app/code/{Vendor}/{Module}, including registration.php, composer.json, and etc/module.xml, to reduce manual setup and ensure consistency.

Core Features & Use Cases

  • Automates module scaffolding: creates app/code/{Vendor}/{Module}, with registration.php, composer.json, and etc/module.xml templates.
  • Configurable dependencies: injects dependencies into module.xml and composer.json as provided.
  • Interoperates with other skills: can be invoked by other Hyva skills to scaffold modules for Hyva projects.

Quick Start

Invoke the hyva-create-module skill with vendor: "Acme", module: "CmsComponents" and, optionally, dependencies and composer_require. After execution, verify the new module structure under app/code/Acme/CmsComponents with boilerplate files. If you want to apply Magento setup, run bin/magento setup:upgrade using the hyva-exec-shell-cmd skill.

Frequently Asked Questions about hyva-create-module

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a Magento 2 module with registration.php and module.xml?

To scaffold a Magento 2 module, this skill generates boilerplate files including registration.php, composer.json, and etc/module.xml under app/code/{Vendor}/{Module}. It creates a consistent module structure by applying configurable dependencies directly into the module.xml sequence.

What's the best way to automate Magento 2 module creation for Hyva projects?

Automating Magento 2 module creation for Hyva projects is achieved by invoking this skill with a vendor and module name. It reliably generates the required boilerplate files under app/code/{Vendor}/{Module} to ensure a consistent module structure.

Does this module scaffolding tool configure composer.json autoload namespaces?

Yes, this module scaffolding tool configures composer.json with proper autoload namespaces. It automatically generates the composer.json file along with registration.php and etc/module.xml templates for new Magento 2 modules.

Can I inject module dependencies into the module.xml sequence automatically?

Yes, you can inject dependencies into the module.xml sequence automatically. By providing optional dependencies when invoking the skill, it configures the etc/module.xml file and updates composer.json with the required modules.

How do I run Magento setup:upgrade after generating a new module?

After generating a new module, you run Magento setup:upgrade using the hyva-exec-shell-cmd skill. First, verify your new module structure under app/code/{Vendor}/{Module} with its boilerplate files before executing the setup command.

When do I need to manually create a Magento 2 module structure instead of scaffolding it?

You do not need to manually create a Magento 2 module structure if you require standard boilerplate files like registration.php, composer.json, and etc/module.xml. This scaffolding skill handles the automated generation of these foundational files to ensure structural consistency.