
hyva-child-theme
Create a Hyvä child theme in a Magento 2 project. This skill should be used when the user wants to create a new Hyvä child theme, set up a custom theme based on Hyvä, or initialize a new frontend theme directory structure. Trigger phrases include "create hyva child theme", "new hyva theme", "setup child theme", "create custom theme", "initialize theme".
- Installs
- 1.3K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/hyva-themes/hyva-ai-tools --skill hyva-child-theme- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads hyva-child-theme automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Hyvä Child Theme Creator
This skill creates a complete Hyvä child theme with the proper directory structure, configuration files, and Tailwind CSS build setup.
Command execution: For commands that need to run inside the development environment (e.g., bin/magento), use the hyva-exec-shell-cmd skill to detect the environment and determine the appropriate command wrapper.
Workflow
Step 1: Gather Theme Information
Prompt the user to provide the following information:
Vendor Name: The vendor/company namespace (e.g., "Acme", "MyCompany")
- Must be PascalCase
- Used in composer package name and directory structure
- If there are existing Vendor name folders in app/design/frontend or app/code/ offer those in lower case as suggestions
Theme Name: The name of the theme (e.g., "customTheme", "StoreTheme")
- Must be PascalCase or camelCase
- Used in theme registration and directory name
- Must not be present as a subdirectory in app/design/frontend
Step 2: Detect Parent Theme
If the user has specified a parent theme, use that. The parent can be:
- A Hyvä default theme:
Hyva/default-csporHyva/default - An existing Hyvä child theme:
{Vendor}/{ThemeName}fromapp/design/frontend/
If the user has NOT specified a parent theme, discover available options by invoking the hyva-theme-list skill to find all Hyvä themes in the project.
Present the user with options to select a parent theme:
- Hyvä default themes:
Hyva/default-csp(if installed) orHyva/default - Existing Hyvä child themes: List themes returned by the skill as
{Vendor}/{ThemeName}
Parent theme paths for later steps:
- Hyvä default themes:
vendor/hyva-themes/magento2-default-theme-csporvendor/hyva-themes/magento2-default-theme - Child themes:
app/design/frontend/{Vendor}/{ThemeName}
Step 3: Create Theme Directory Structure
Create the theme directory at app/design/frontend/<Vendor>/<themeName>/ with:
app/design/frontend/<Vendor>/<themeName>/
├── registration.php
├── theme.xml
├── composer.json
└── web/
└── tailwind/
└── (copied from parent theme)
Step 4: Create Configuration Files
registration.php
<?php
declare(strict_types=1);
use Magento\Framework\Component\ComponentRegistrar;
ComponentRegistrar::register( ComponentRegistrar::THEME, 'frontend/<Vendor>/<themeName>', __DIR__);
theme.xml
<?xml version="1.0"?>
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Example Store Theme</title>
<parent>Hyva/default-csp</parent>
</theme>
Title formatting: Split PascalCase theme names into separate words (e.g., StoreTheme → Store Theme). The title should read as <Vendor> <Theme Name Words> (e.g., Example/StoreTheme → Example Store Theme).
Adjust <parent> to match the selected parent theme:
Hyva/default-csporHyva/defaultfor Hyvä default themes{ParentVendor}/{ParentThemeName}for child theme parents (e.g.,Example/baseTheme)
composer.json
{
"name": "<vendor-lowercase>/<package-name>",
"description": "Example Store Theme based on Hyvä",
"type": "magento2-theme",
"license": "proprietary",
"require": {
"hyva-themes/magento2-default-theme-csp": "*"
},
"autoload": {
"files": [
"registration.php"
]
}
}
Package name rules:
- Convert
<ThemeName>to kebab-case (e.g.,StoreTheme→store-theme) - Append
-themesuffix only if the theme name doesn't already end with "theme" - Examples:
StoreTheme→store-theme(already ends with "theme", no suffix added)CustomStore→custom-store-theme(suffix added)myTheme→my-theme(already ends with "theme", no suffix added)
Adjust the require dependency to match the parent theme:
- For Hyvä default themes:
hyva-themes/magento2-default-theme-csporhyva-themes/magento2-default-theme - For child theme parents: Use the parent's composer package name (from its
composer.json), or omit if the parent theme is not a composer package
Step 5: Copy and Configure Tailwind
Create the web directory and copy the tailwind folder from the parent theme, excluding node_modules (copied node_modules contain broken symlinks and must be installed fresh):
mkdir -p app/design/frontend/<Vendor>/<ThemeName>/web
rsync -a --exclude='node_modules' <parent_theme_path>/web/tailwind app/design/frontend/<Vendor>/<ThemeName>/web/
Where <parent_theme_path> is:
vendor/hyva-themes/magento2-default-theme-cspfor Hyvä default-cspvendor/hyva-themes/magento2-default-themefor Hyvä defaultapp/design/frontend/{ParentVendor}/{ParentTheme}for child theme parents
Update web/tailwind/hyva.config.json to include the parent theme path(s) in Tailwind content scanning.
For Hyvä default theme parent:
{
"tailwind": {
"include": [
{ "src": "vendor/hyva-themes/magento2-default-theme-csp" }
]
}
}
For child theme parent: Include both the immediate parent AND the root Hyvä theme to ensure all template classes are scanned:
{
"tailwind": {
"include": [
{ "src": "app/design/frontend/{ParentVendor}/{ParentTheme}" },
{ "src": "vendor/hyva-themes/magento2-default-theme-csp" }
]
}
}
If the child theme parent already has additional includes in its hyva.config.json, copy those to maintain the full inheritance chain.
Step 6: Install Dependencies and Build CSS
Use the hyva-compile-tailwind-css skill to install dependencies and build CSS for the newly created theme at app/design/frontend/<Vendor>/<ThemeName>/.
Step 7: Enable the Theme
Inform the user they can enable the theme via:
- Magento Admin: Content > Design > Configuration
- Or via CLI:
bin/magento config:set design/theme/theme_id <theme_id>
Run setup upgrade to register the theme:
bin/magento setup:upgrade
bin/magento cache:flush
Troubleshooting
No Hyvä themes found (Step 2)
Cause: Hyvä theme packages not installed in the project.
Solution: Install Hyvä themes via Composer: composer require hyva-themes/magento2-default-theme or hyva-themes/magento2-default-theme-csp.
Parent theme path doesn't exist (Step 5)
Cause: The selected parent theme directory is missing or path is incorrect.
Solution: Verify the parent theme exists before running rsync. Check that Composer packages are properly installed with composer install.
Tailwind folder missing in parent (Step 5)
Cause: The parent theme doesn't have a web/tailwind directory (possible with very old or custom themes).
Solution: Fall back to copying the tailwind folder from vendor/hyva-themes/magento2-default-theme-csp/web/tailwind instead.
npm install fails (Step 6)
Cause: Node version mismatch, network issues, or corrupted package-lock.json. Solution:
- Check Node version (requires Node 16+):
node --version - Delete
node_modulesandpackage-lock.json, then retrynpm install
npm build fails (Step 6)
Cause: Invalid paths in hyva.config.json or missing purge targets.
Solution:
- Verify all paths in
hyva.config.jsonexist in the project - Check for JSON syntax errors in the config file
- Ensure parent theme paths are correct
Output
After successful creation, provide a summary:
- Theme location:
app/design/frontend/<Vendor>/<ThemeName>/ - Parent theme: The selected parent (e.g.,
Hyva/default-csp,Hyva/default, or{Vendor}/{ThemeName}) - Next steps for customization:
- Override templates by creating matching paths
- Customize Tailwind in
web/tailwind/tailwind-source.css - Run
npm run watchfor development - Run
npm run buildbefore deployment
FAQ
What does the hyva-child-theme skill do?
Create a Hyvä child theme in a Magento 2 project. This skill should be used when the user wants to create a new Hyvä child theme, set up a custom theme based on Hyvä, or initialize a new frontend theme directory structure. Trigger phrases include "create hyva child theme", "new hyva theme", "setup child theme", "create custom theme", "initialize theme".
How do I install hyva-child-theme?
Run npx skills add https://github.com/hyva-themes/hyva-ai-tools --skill hyva-child-theme in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/hyva-child-theme/ (personal) or .claude/skills/hyva-child-theme/ (project).
Which AI agents can use hyva-child-theme?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is hyva-child-theme safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains hyva-child-theme?
It is published by hyva-themes in hyva-themes/hyva-ai-tools. It has 1,294 recorded installs.
More from hyva-themes/hyva-ai-tools
hyva-exec-shell-cmd
hyva-themes/hyva-ai-tools
Utility skill to detect Magento development environment and determine command wrapper. This skill should be used by other skills that need to execute shell commands in the Magento environment. It detects Warden, docker-magento, DDEV, and local environments and provides the appropriate command wrapper.
hyva-alpine-component
hyva-themes/hyva-ai-tools
Write CSP-compatible Alpine.js components for Hyvä themes in Magento 2. This skill should be used when the user wants to create Alpine components, add interactivity to Hyvä templates, write JavaScript for Hyvä themes, or needs help with Alpine.js patterns that work with Content Security Policy. Trigger phrases include "create alpine component", "add interactivity", "alpine for hyva", "x-data component", "csp compatibility", "csp compliant javascript".
hyva-compile-tailwind-css
hyva-themes/hyva-ai-tools
Compile Tailwind CSS for Hyvä themes in Magento 2. Use when the user wants to build styles, generate CSS, compile Tailwind, run Tailwind, or create production/development stylesheets for a Hyvä theme. Also use when Tailwind classes are not taking effect or some styles appear missing after template changes — this typically means CSS needs to be recompiled. Triggers include "compile tailwind", "build styles", "generate css", "styles not working", "styles are missing", "styles not applied".
hyva-render-media-image
hyva-themes/hyva-ai-tools
Generate responsive image code for Hyvä Theme templates using the Media view model. This skill should be used when the user wants to render images in a Hyvä template, create responsive picture elements, add hero images, product images, or any image that needs responsive breakpoints. Trigger phrases include "render image", "add image to template", "responsive image", "picture element", "hero image", "responsive banner", "image for mobile and desktop", or "banner image".
hyva-ui-component
hyva-themes/hyva-ai-tools
Apply Hyva UI template-based components to a Hyvä theme. This skill should be used when the user wants to add, install, or apply a Hyva UI component (such as header, footer, gallery, menu, minicart, etc.) to their Hyvä theme. It lists available non-CMS components and their variants, displays component README instructions, and copies component files to the theme directory.
hyva-playwright-test
hyva-themes/hyva-ai-tools
Write Playwright tests for Hyvä themes with Alpine.js components. This skill should be used when writing e2e tests, creating page objects, or debugging selector issues in Playwright tests for Hyvä Magento storefronts. Trigger phrases include "write playwright test", "playwright alpine", "test hyva page", "e2e test", "playwright selector".
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance 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.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.