ddtcorex/maestro-skills / skills/magento2-hyva-dev
magento2-hyva-dev
FlaggedUse when creating a Hyvä theme or child theme, building an Alpine.js component, making markup CSP-compliant, adding Tailwind classes, or converting Luma to Hyvä. DEPENDENT on magento2-dev-core.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.2 KB |
| references/alpine.md | markdown | 3.7 KB |
| references/compatibility-modules.md | markdown | 1.3 KB |
| references/csp.md | markdown | 3.2 KB |
| references/migration.md | markdown | 1.2 KB |
| references/review-checklist.md | markdown | 4.3 KB |
| references/tailwind.md | markdown | 2.7 KB |
| references/theme-and-child.md | markdown | 2.4 KB |
| references/view-models.md | markdown | 1.6 KB |
references/theme-and-child.md
View on GitHub# Theme structure and the Luma comparison
What changes from Luma, the theme layout, and the child theme setup including the CSP
template source. The rules are in `SKILL.md`.
## Comparison with Luma
| Aspect | Luma | Hyvä |
|--------|------|------|
| JavaScript | ~200 resources (RequireJS/Knockout) | 2 resources (Alpine.js) |
| CSS | LESS-based | Tailwind CSS |
| Bundle Size | 500KB+ | <50KB |
| Core Web Vitals | Challenging | Optimized |
| Learning Curve | Steep | Gentle |
| Maintenance | Complex | Simple |
## Creating a child theme
Always copy `web/` from the parent theme rather than creating it from scratch: it carries the Tailwind config and build tooling the theme needs:
```bash
mkdir -p app/design/frontend/<Vendor>/<Theme>/web
cp -r vendor/hyva-themes/magento2-default-theme/web/* app/design/frontend/<Vendor>/<Theme>/web/
# For a CSP theme, copy from magento2-default-theme-csp instead
```
Then add `registration.php`, `theme.xml` (parent: `Hyva/default`, `Hyva/reset`, or `Hyva/default-csp`), and `composer.json`; install the Tailwind deps, run the build, then `bin/magento setup:upgrade && bin/magento cache:flush` to pick up the new theme.
```
app/design/frontend/Vendor/Theme/
├── registration.php
├── theme.xml
├── composer.json
├── web/
│ ├── tailwind/
│ │ ├── package.json # Theme build tooling (npm)
│ │ ├── tailwind-source.css # Entry point (v4: @source and @theme live here)
│ │ ├── tailwind.config.js # Tailwind v2/v3 only
│ │ ├── base/ # Preflight, resets
│ │ ├── generated/ # Written by the build (hyva-source.css, hyva-tokens.css), do not edit
│ │ ├── components/ # Reusable components
│ │ │ ├── button.css
│ │ │ ├── forms.css
│ │ │ └── messages.css
│ │ ├── utilities/ # Custom utilities
│ │ └── theme/ # Page-specific
│ └── css/
│ └── styles.css # Build output
├── Magento_Theme/
│ ├── layout/
│ │ └── default.xml # theme layout lives under <Module>/, never at the root
│ └── templates/ # Alpine components live inline here, next to their markup
```
Hyvä has no per-theme JS directory convention: an Alpine component is an inline
`<script>` in the `.phtml` that renders it, followed by `registerInlineScript()`.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |