- Home
- Skills
- Hyva Themes
- Hyva Ai Tools
- Hyva Create Module
hyva-create-module_skill
- PHP
38
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill hyva-themes/hyva-ai-tools --skill hyva-create-module- SKILL.md6.1 KB
Overview
This skill scaffolds a new Magento 2 module under app/code/ using Hyva conventions. It generates registration.php, composer.json, and etc/module.xml with configurable dependencies and composer requirements. Use it to quickly create consistent module boilerplate ready for development.
How this skill works
The skill validates PascalCase vendor and module names and ensures the target directory does not already exist. It creates the directory structure, renders file templates with placeholders replaced (vendor/module names, kebab-case package name, description, and sequence dependencies), and optionally invokes setup:upgrade via the hyva-exec-shell-cmd skill. Errors during validation, file writes, or directory creation are reported back to the caller.
When to use it
- You need to create a new Magento 2 module under app/code/ quickly.
- Scaffolding module boilerplate for Hyva-based extensions.
- Generating registration.php, composer.json, and module.xml with dependencies.
- Preparing a custom module before adding business logic or UI.
- Automating module creation in CI or development scripts called by other skills.
Best practices
- Provide vendor and module names in PascalCase (e.g., Acme, CustomFeature).
- Supply composer_require entries to include runtime PHP package dependencies in composer.json.
- List Magento module dependencies in the dependencies array to populate module.xml <sequence>.
- Run bin/magento setup:upgrade after creation; the skill can call hyva-exec-shell-cmd if available.
- Check generated composer.json and module.xml for required versions and adjust before committing.
Example use cases
- Create Acme CmsComponents with Hyva_CmsBase dependency and hyva-themes package required.
- Automate module scaffolding from a higher-level generator that wires feature code and tests.
- Rapidly produce multiple feature modules for a micro-module architecture.
- Add a starter module during project bootstrapping in a new Hyva-based project.
FAQ
You must provide vendor and module in PascalCase. Description, dependencies, and composer_require are optional.
Will the skill run setup:upgrade automatically?
It will only run setup:upgrade if requested and if the hyva-exec-shell-cmd skill is available; otherwise it reports a skipped message and you must run bin/magento setup:upgrade manually.