# hyva-create-module

Scaffolds a Magento 2 module in app/code/ with registration.php, composer.json and etc/module.xml. Useful when you need a new module without copying boilerplate by hand.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1300 installs · ★ 85
- Author: hyva-themes
- License: OSL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/hyva-themes/hyva-ai-tools/tree/HEAD/skills/hyva-create-module/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/hyva-create-module

## What it does

The skill lays out a new module under `app/code/{Vendor}/{Module}`. It takes a vendor and module name in PascalCase, plus optional description, `<sequence>` dependencies and composer requirements. From those it generates three files from templates: `registration.php`, `composer.json` and `etc/module.xml`.

Before writing anything it checks that both names start with an uppercase letter and contain only alphanumerics, and that the target directory does not exist yet. If a check fails, creation stops and the error goes back to the calling skill. Kebab-case names for composer are derived automatically: `ShoppingCartGraphQl` becomes `shopping-cart-graph-ql`.

This is a utility skill for other skills rather than a standalone generator — it gets invoked when a workflow needs a module skeleton. The `bin/magento setup:upgrade` step depends on the `hyva-exec-shell-cmd` skill; without it that step is skipped and you run the command yourself. An existing module directory in `app/code` blocks the run, so clear the old folder first.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add hyva-themes/hyva-ai-tools --skill hyva-create-module -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/hyva-create-module/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/hyva-create-module/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add hyva-themes/hyva-ai-tools --skill hyva-create-module -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/hyva-create-module/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add hyva-themes/hyva-ai-tools --skill hyva-create-module -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/hyva-create-module/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install hyva-themes/hyva-ai-tools hyva-create-module
```

2. **Manually: put the files in place**
- File: `.github/skills/hyva-create-module/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add hyva-themes/hyva-ai-tools --skill hyva-create-module -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/hyva-themes/hyva-ai-tools --path skills/hyva-create-module
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/hyva-create-module/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add hyva-themes/hyva-ai-tools --skill hyva-create-module -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/hyva-themes/hyva-ai-tools/tree/HEAD/skills/hyva-create-module/SKILL.md

## When to use it
- scaffold a Magento 2 module without hand-copying files
- generate `registration.php`, `composer.json` and `etc/module.xml` from templates
- declare module dependencies in the `<sequence>` block
- add composer requirements to the `require` section
- validate vendor and module names as PascalCase before creating directories

## Example prompts
- Create a Magento 2 module: vendor `Acme`, module `CmsComponents`, dependency `Hyva_CmsBase`.
- Scaffold module `Acme_CustomFeature` in `app/code` with a description and composer requirement `hyva-themes/commerce-module-cms`.
- Generate a new module `Acme_ShoppingCartGraphQl` and run `bin/magento setup:upgrade`.

## Similar
- [magento-module-developer](https://affpapa.org/en/nevibecode/skills/magento-module-developer.md) — skill · 438 installs
- [magento-hyva-specialist](https://affpapa.org/en/nevibecode/skills/magento-hyva-specialist.md) — skill · 857 installs
- [php-mcp-server-generator](https://affpapa.org/en/nevibecode/skills/php-mcp-server-generator.md) — skill · 8900 installs
- [wp-phpstan](https://affpapa.org/en/nevibecode/skills/wp-phpstan.md) — skill · 4600 installs
- [php-development](https://affpapa.org/en/nevibecode/skills/php-development.md) — skill · 1100 installs
- [appwrite-php](https://affpapa.org/en/nevibecode/skills/appwrite-php.md) — skill · 847 installs

From the same set: [hyva-themes/hyva-ai-tools](https://affpapa.org/en/nevibecode/by/hyva-themes/hyva-ai-tools.md) — 6 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
