hyva-register-module-tailwind
БесплатноБез исполняемых скриптовНе проверенRegister a Magento 2 module for Hyvä Tailwind compilation so it is listed in app/etc/hyva-themes.json. Use when the user wants a module to ship Tailwind…
от hyva-themes★ 86 звёзд на GitHubОб этом скилле
Register a Module for Tailwind Compilation
Adds a Magento 2 module to app/etc/hyva-themes.json so @hyva-themes/hyva-modules scans it for Tailwind configuration and CSS during compilation. This is done from the module itself, with an observer on hyva_config_generate_before. This is a different task from adding a module to the include/exclude lists in a theme's hyva.config.json.
Follow the official documentation exactly; do not invent APIs, event names or file names:
- Registering a Module for Tailwind Compilation
- Tailwind Asset Merging (module Tailwind files)
- hyva-sources (Tailwind v4)
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.
Skill deps (read via <skill_path>/../{name}/SKILL.md, where <skill_path> is the directory containing this SKILL.md file): hyva-exec-shell-cmd, hyva-compile-tailwind-css
Non-interactive runs: Where a step says to ask the user and the user cannot be asked (subagent or non-interactive run), stop and report which input or confirmation is missing, unless the step itself says what to do in that case. Do not guess the module, do not write into a package under vendor/ that is not a symlink without confirmation, and do not compile Tailwind CSS; state in the final report that the styles need recompiling.
Parameters
| Parameter | Required | Description |
|---|---|---|
vendor |
Yes, unless module_path is given |
Vendor name in PascalCase (e.g., My) |
module |
Yes, unless module_path is given |
Module name in PascalCase (e.g., Module) |
module_path |
No | Filesystem path to the module, relative to the Magento root if known (e.g., app/code/My/Module or vendor/acme/module-anvil/src). Resolved in Step 1 if omitted. |
The Magento module name is {Vendor}_{Module} (e.g., My_Module). The PHP namespace is {Vendor}\{Module}.
Step 1: Identify the Module
Resolve {Vendor}, {Module}, and the module directory:
- If a
Vendor_Modulename was provided, look forapp/code/{Vendor}/{Module}first, then locate it undervendor/viaregistration.php. - If a path was provided, verify it exists and read the module name from
etc/module.xmlorregistration.php. - If neither is clear, ask the user which module to register. Wait for the answer before proceeding.
Compatibility modules are registered automatically. If the module registers itself with Hyva\CompatModuleFallback\Model\CompatModuleRegistry in etc/frontend/di.xml (automatic template overrides), do not add this observer. Inform the user that compatibility modules using CompatModuleRegistry are already included in hyva-themes.json, and stop.
Already registered. If etc/frontend/events.xml already declares an observer on hyva_config_generate_before that registers this module, say so and skip Steps 2 and 3. Continue with Step 4 if the Tailwind files still need to be added, otherwise with Step 5.
Modules under vendor/. If files still need to be written and the module directory is inside vendor/, check whether the package directory is a symlink.
- Not a symlink: warn the user that files written there are overwritten when Composer reinstalls or updates the package, and that the change belongs in the package's source repository. Ask for confirmation before writing anything.
- A symlink: this usually means a local path repository that the user develops, so no confirmation is needed. Resolve the real path of the link target. If it lies outside the Magento root, stop before writing anything and report that the observer from the documentation cannot register this module, because it needs a path relative to the Magento root.
Step 2: Declare the Event Observer
Register an observer for hyva_config_generate_before in the module's etc/frontend/events.xml.
If etc/frontend/events.xml does not exist, create it from assets/templates/events.xml.tpl. If it already exists, add the <event> element from the template to the existing <config>. If the file already has an <event name="hyva_config_generate_before">, add only the <observer> to that element: the schema allows each event name once per file. Do not overwrite other observers.
Replacements:
{{VENDOR}}: PascalCase vendor name{{MODULE}}: PascalCase module name
The result must have the observer name {Vendor}_{Module}_Register_Hyva_Config and the instance {Vendor}\{Module}\Observer\RegisterModuleForHyvaConfig. The template is the example from the official documentation; do not change its struc
Установить hyva-register-module-tailwind в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл hyva-register-module-tailwind?
Register a Magento 2 module for Hyvä Tailwind compilation so it is listed in app/etc/hyva-themes.json. Use when the user wants a module to ship Tailwind styles or config, add a hyva_config_generate_before observer, create view/frontend/tailwind files (module.css, tailwind.config.js, tailwind-source.css), or run hyva:config:generate. Trigger phrases include "register module for tailwind", "hyva-themes.json", "hyva_config_generate_before", "module tailwind compilation".
Как установить скилл hyva-register-module-tailwind?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл hyva-register-module-tailwind запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies 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…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic