ddtcorex/maestro-skills/magento2-hyva-dev
- community
- ext:[{"type":"template","description":"Custom templates for code generation"}]
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user asks to "create a Hyvä theme", "set up a child theme", "build an Alpine.js component", "make this CSP-compliant", "add Tailwind CSS classes", "convert Luma to Hyvä", "migrate Knockout to Alpine", work on "Hyvä checkout" or "Hyvä React components", or handle "Tailwind configuration" or "CSP nonce registration". Provides expert Hyvä theme development for Magento 2. This is a SPECIALIZED skill for Hyvä-specific patterns. DEPENDENT on magento2-dev-core for PHP/backend patterns.
Install
npx vskill@latest install ddtcorex/maestro-skills/magento2-hyva-devSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Magento 2 Hyvä Developer
Hyvä is a modern Magento 2 frontend framework with dramatically simplified JavaScript and CSS. This skill covers Hyvä-specific patterns.
Related Skills
REQUIRED BACKGROUND: Load magento2-dev-core first — it defines the PHP/backend patterns (DI, escaping, repositories) this skill assumes for any ViewModel or backend code behind a Hyvä template.
Hyvä and Luma (magento2-frontend-dev) are mutually exclusive theme stacks — check the theme's theme.xml parent (Hyva/default/Hyva/reset vs Magento/blank) and composer.json for hyva-themes/* packages before assuming either applies. Hybrid projects (e.g. dual-stack) keep both: app/design/frontend/<Vendor>/hyva_* → this skill, app/design/frontend/<Vendor>/luma_child → magento2-frontend-dev. Pair with govard-magento for the container/CLI side.
Detect the project's actual setup first
Otherwise: read theme.xml parent, <theme>/web/tailwind/package.json, tailwind.config.js or tailwind-source.css+hyva.config.json, and composer.lock — verify, don't memorize table (verified 2026-08-26).
Hyvä/Tailwind conventions vary a lot by project age — check before applying a pattern:
- Tailwind version: v4 uses CSS-based config and
hyva.config.jsondesign tokens; v2/v3 usetailwind.config.js. Checkweb/tailwind/package.json. - CSP build:
Hyva/default-cspvs the plainHyva/default/Hyva/resetparent intheme.xml. Applying CSP-only nonce patterns to a non-CSP theme (or vice versa) wastes effort. - Parent theme:
Hyva/reset(built from scratch) vsHyva/default(full starter) changes how much markup/CSS already exists to extend rather than rewrite.
Hyvä vs Luma Comparison
| 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 |
Theme Structure
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:
Then add registration.php, theme.xml (parent: Hyva/default, Hyva/reset, or Hyva/default-csp), and composer.json, install Tailwind deps and build, then bin/magento setup:upgrade && bin/magento cache:flush to pick up the new theme.
CSP (Content Security Policy) Compliance
Critical: PCI-DSS 4.0 (Required since April 2025)
Payment pages MUST NOT use:
unsafe-evalCSP directiveunsafe-inlineCSP directive
CSP Nonce Registration
Every inline script MUST register with CSP:
$hyvaCsp is ambient — never demand an assignment. The Hyvä themeprovides the$hyvaCspview model to every template: a/** @var */docblock (as above) is the complete setup, no$viewModels->require(HyvaCsp::class)needed.isset($hyvaCsp)guardsare the correct pattern for templates that must also render withoutHyvä/CSP — never flag them as dead code, and never claimisset()isalways false from template text alone. If CSP registration genuinelylooks unwired, check layout XML / theme wiring first (a missing call toa mechanism the project doesn't have is "not applicable", not a finding).
CSP-Compatible Alpine.js Patterns
WRONG (CSP violations):
CORRECT (CSP-compliant):
Registering Alpine Components
Alpine.js Component Structure
Basic Component
Template Usage
Passing Data from PHP
Hyvä Utilities
Hyvä provides global utilities via the hyva object:
Form Handling
Cookies
Formatting
DOM Manipulation
Events
View Models
Prefer view models (Hyva\Theme\Model\ViewModelInterface / Magento's ArgumentInterface) over blocks for passing data to templates — they keep PHP logic out of the theme directory (which should hold only templates, layout, i18n, and web/ assets) and in a proper app/code module where Magento's DI can autoload the class.
Tailwind CSS
Tailwind v4 (CSS-based config)
Newer Hyvä themes use Tailwind v4, which drops tailwind.config.js for a CSS-based config plus a hyva.config.json design-token file — check web/tailwind/package.json first, the two configs are not interchangeable.
Generate tokens/sources with npx hyva-sources / npx hyva-tokens rather than hand-rolling them. Alpine gating: Tailwind v4 sources come from CSS @source directives and hyva.config.json tailwind.include/exclude; editing hyva.config.json on a v3 setup is a silent no-op — verify web/tailwind/package.json tailwindcss major before touching either config.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/magento2-hyva-dev/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
templateCustom templates for code generation
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ddtcorex/maestro-skills/magento2-hyva-dev)