hyva-cms-component
БесплатноБез исполняемых скриптовНе проверенCreate custom Hyvä CMS component. This skill should be used when the user wants to create a new Hyvä CMS component, build a Hyvä component, or needs help with…
от hyva-themes★ 86 звёзд на GitHubОб этом скилле
Hyvä CMS Component Creator
Overview
This skill guides the interactive creation of custom Hyvä CMS components for Magento 2. It supports creating components in new or existing modules, with field presets for common patterns and automatic setup:upgrade execution.
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-create-module, hyva-cms-components-dump, hyva-render-media-image
Non-interactive runs: If the user cannot be asked (subagent or non-interactive run), take the inputs from the request. Stop and report what is missing if any of these were not given: the target module (or the vendor name for a new module), the component name and label, and the fields (a preset name or a field list). Choose the category from the component's purpose, and create a single template without variants unless variants were requested.
Workflow
Step 1: Module Selection
If not already specified in the prompt, ask the user where to create the component:
Option A: New Module
Ask for both values (do not assume defaults without asking):
- Vendor name (e.g.,
Acme) - Required, no default. Do not suggest a Vendor name, prompt for user input. - Module name - Suggest
CmsComponentsas default so user can press Enter to accept
Then use the hyva-create-module skill with:
dependencies:["Hyva_CmsBase"]composer_require:{"hyva-themes/commerce-module-cms": "^1.0"}
Option B: Existing Module
- Request the module path (can be in
app/code/,vendor/, or custom location) - Verify the module has
Hyva_CmsBaseas a dependency inetc/module.xml. If not present, add it. - Verify the module has
hyva-themes/commerce-module-cmsas a dependency incomposer.json. If not present, add it.
Step 2: Component Details
Gather component information:
Component name (snake_case, e.g.,
feature_card)Label (display name in editor, e.g., "Feature Card")
Category (Layout, Elements, Media, Content, or Other)
Icon - Automatically select an appropriate icon:
Step 4a: Identify icons already in use Use the
hyva-cms-components-dumpskill to dump all current CMS components. Extract alliconvalues from the output to build a list of icons already in use by existing components.Step 4b: Find available lucide icons List the SVG files in
vendor/hyva-themes/magento2-theme-module/src/view/base/web/svg/lucide/to get the full set of available icons.Step 4c: Select the best fitting icon From the available lucide icons that are NOT already in use by another component:
- Choose the icon whose name best matches the purpose/meaning of the new component
- Consider semantic meaning (e.g.,
shopping-cart.svgfor cart-related,image.svgfor image-related,layout-grid.svgfor grid layouts) - Format the selected icon as
Hyva_Theme::svg/lucide/[icon-name].svg
If no suitable unused icon can be found, or if the lucide directory doesn't exist, leave the
iconproperty unset.
Step 3: Field Selection
Offer field presets or custom field creation. See references/field-types.md "Field Presets" section for available presets (Basic Card, Image Card, CTA Block, Text Block, Feature Item, Testimonial, Accordion Item) or allow custom field definition.
Authoritative field types: prefer the project's live list when available — run
bin/magento hyva:cms:list-fields (core + custom field types) via the
hyva-exec-shell-cmd wrapper. Fall back to references/field-types.md only when the
command is unavailable.
For custom fields, iterate through each field asking:
- Field name (snake_case)
- Field type (see
references/field-types.md) - Label
- Default value (optional)
- Required? (yes/no) - Note: This will be added as
attributes.required, NOT as a direct field property - Any additional attributes (these go in the
attributesobject)
Step 4: Variant Support
Ask if the component needs template variants:
- If yes: Gather variant names and labels (e.g., default, compact, wide). See
references/variant-support.mdfor configuration details. - If no: Use single template
Step 5: Generate Files
Create the required files:
For New Modules
The hyva-create-module skill creates the base module structure. Then add the CMS-specific directories:
app/code/[Vendor]/[Module]/
├── registration.php # Created by hyva-create-module
├── composer.json # Created by hyva-create-module
├── etc/
│ ├── module.xml # Created by hyva-create-module
│ └── hyva_cms/
│ └── components.json # Create this
└── view/
└── frontend/
└── templates/
Установить hyva-cms-component в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл hyva-cms-component?
Create custom Hyvä CMS component. This skill should be used when the user wants to create a new Hyvä CMS component, build a Hyvä component, or needs help with components.json and PHTML templates for Hyvä CMS. Trigger phrases include "create hyva cms component", "add cms component", "new hyva component", "build page hyva cms element", "custom cms element".
Как установить скилл hyva-cms-component?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл hyva-cms-component запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic