hyva-ui-component by hyva-themes/hyva-ai-tools
npx skills add https://github.com/hyva-themes/hyva-ai-tools --skill hyva-ui-component通过将文件从 {hyva_ui_path}/components/ 复制到 app/design/frontend/{Vendor}/{Theme}/,将 Hyva UI 基于模板(非 CMS)的组件应用到 Hyvä 主题。
路径变量: {hyva_ui_path} = vendor/hyva-themes/hyva-ui(默认)或用户提供的自定义路径。
命令执行: 对于需要在开发环境中运行的任何命令(例如 bin/magento 命令),使用 hyva-exec-shell-cmd 技能来检测环境并确定适当的命令包装器。
ls vendor/hyva-themes/hyva-ui/components/ 2>/dev/null
如果未找到,提供选项:(A) 用户提供自定义提取路径,(B) composer require --dev hyva-themes/hyva-ui,(C) 从 下载
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
安装后,刷新目录:<skill_path>/scripts/refresh_catalog.sh {hyva_ui_path} <skill_path>/references/components.md
其中 <skill_path> 是包含此 SKILL.md 文件的目录。
使用 hyva-theme-list 技能查找现有的 Hyvä 主题。过滤结果,仅包含 app/design/frontend/ 中的主题(排除供应商主题)。
提示用户选择:
Example/winterWonderTheme)如果用户选择“创建新主题”:
hyva-child-theme 技能创建新主题如果用户选择现有主题: 继续使用选定的主题路径:app/design/frontend/{Vendor}/{Theme}
如果未指定组件或用户要求列出组件,仅显示 references/components.md 中的 “非 CMS 组件(基于模板)”部分。
请勿列出或提及:
这些是内部依赖项或需要 CMS Tailwind JIT 编译器,不适用于通过此技能直接安装。
变体:A = 基础,B = 增强,C = 高级,D = 专业。使用以下命令列出:ls {hyva_ui_path}/components/{component}/
在复制之前,始终读取 {hyva_ui_path}/components/{component}/{variant}/README.md。向用户展示:依赖项、配置选项、特殊要求。
复制前,检查哪些目标文件已存在,以跟踪创建与更新:
# 列出源文件
find {hyva_ui_path}/components/{component}/{variant}/src -type f
# 对于每个源文件,检查目标是否存在
# 例如,对于 src/Magento_Catalog/templates/product/view/gallery.phtml
# 检查:{theme_path}/Magento_Catalog/templates/product/view/gallery.phtml
将每个文件跟踪为:
然后复制:
cp -r {hyva_ui_path}/components/{component}/{variant}/src/* {theme_path}/
src/ 目录包含直接映射到主题结构的 Magento 模块文件夹(Magento_Theme/、Magento_Catalog/ 等)。对于现有的布局 XML 文件,合并内容而不是覆盖。
检查 README 是否包含 XML 配置(查找 <var name="、etc/view.xml)。
如果找到:
<var name= 元素的 XML 块module="Magento_Catalog"){theme_path}/etc/view.xml:
<view> 结构创建<vars module="..."> 存在:在其内部添加 <var> 元素</view> 之前添加新的 <vars module="...">{theme_path}/etc/view.xml,并设置了默认值。”保留现有的 view.xml 内容和 README 中的 XML 注释。
检查 README 中的依赖项并自动安装它们(不要要求用户选择插件):
{hyva_ui_path}/plugins/{plugin}/src/ 复制所需文件(例如,gallery/D-splide 的 splidejs)composer require hyva-themes/magento2-hyva-payment-iconshyva-compile-tailwind-css 技能并指定目标主题。应用所有更改后,输出修改摘要:
显示在此组件安装期间创建或修改的所有文件。使用步骤 5 中的跟踪来正确标记每个文件:
(已创建):文件之前不存在,是新创建的
(已更新):文件已存在并被覆盖
已修改的文件:
如果将 XML 配置添加到 {theme_path}/etc/view.xml,请从 README 中解析 XML 块并显示选项表:
# 从 README 中提取 XML 配置块并解析
php <skill_path>/scripts/parse_readme_xml.php --format=table < xml_block.txt
该表显示每个选项,包含以下列:
magnifier.enable)示例输出(公共前缀如 gallery. 会自动去除):
选项 | 值 | 描述
---------------------+------------+---------------------------------------------------
nav | thumbs | 图库导航样式(false/thumbs/counter)
magnifier.enable | false | 启用/禁用放大镜(true/false)
对于 markdown 输出(例如,创建文档时),使用 --format=md。
{hyva_ui_path}/components/{component}/{variant}/
├── README.md # 说明
├── media/ # 预览图片
└── src/ # 要复制到主题的文件
有关完整组件目录,请参阅 references/components.md(仅向用户显示非 CMS 部分)。
每周安装次数
155
代码库
GitHub 星标
59
首次出现
2026年1月27日
安全审计
安装于
github-copilot153
opencode149
codex149
gemini-cli145
amp144
kimi-cli144
Applies Hyva UI template-based (non-CMS) components to a Hyvä theme by copying files from {hyva_ui_path}/components/ to app/design/frontend/{Vendor}/{Theme}/.
Path variable: {hyva_ui_path} = vendor/hyva-themes/hyva-ui (default) or user-provided custom path.
Command execution: For any commands that need to run inside the development environment (e.g., bin/magento commands), use the hyva-exec-shell-cmd skill to detect the environment and determine the appropriate command wrapper.
ls vendor/hyva-themes/hyva-ui/components/ 2>/dev/null
If NOT found , offer options: (A) User provides custom extraction path, (B) composer require --dev hyva-themes/hyva-ui, (C) Download from https://hyva.io/my-account/my-downloads/
After install, refresh catalog: <skill_path>/scripts/refresh_catalog.sh {hyva_ui_path} <skill_path>/references/components.md
Where <skill_path> is the directory containing this SKILL.md file.
Use the hyva-theme-list skill to find existing Hyvä themes. Filter the results to only include themes in app/design/frontend/ (exclude vendor themes).
Prompt the user to select:
Example/winterWonderTheme)If user selects "Create new theme":
hyva-child-theme skill to create the new theme firstIf user selects an existing theme: Continue with the selected theme path: app/design/frontend/{Vendor}/{Theme}
If no component specified or user asks to list components, show only the "Non-CMS Components (Template-Based)" section from references/components.md.
Do NOT list or mention:
These are internal dependencies or require the CMS Tailwind JIT compiler and are not applicable for direct installation via this skill.
Variants: A =Basic, B =Enhanced, C =Advanced, D =Specialized. List with: ls {hyva_ui_path}/components/{component}/
Always read {hyva_ui_path}/components/{component}/{variant}/README.md before copying. Present to user: dependencies, configuration options, special requirements.
Before copying , check which destination files already exist to track created vs updated:
# List source files
find {hyva_ui_path}/components/{component}/{variant}/src -type f
# For each source file, check if destination exists
# e.g., for src/Magento_Catalog/templates/product/view/gallery.phtml
# check: {theme_path}/Magento_Catalog/templates/product/view/gallery.phtml
Track each file as either:
Then copy:
cp -r {hyva_ui_path}/components/{component}/{variant}/src/* {theme_path}/
The src/ directory contains Magento module folders (Magento_Theme/, Magento_Catalog/, etc.) that map directly to theme structure. For existing layout XML files, merge content rather than overwriting.
Check if README contains XML configuration (look for <var name=", etc/view.xml).
If found:
<var name= elements with default valuesmodule="Magento_Catalog"){theme_path}/etc/view.xml:
<view> structure<vars module="..."> exists: Add <var> elements inside it<vars module="..."> before </view>{theme_path}/etc/view.xml with default values."Preserve existing view.xml content and keep XML comments from README.
Check README for dependencies and install them automatically (do not ask the user to select plugins):
{hyva_ui_path}/plugins/{plugin}/src/ (e.g., splidejs for gallery/D-splide)composer require hyva-themes/magento2-hyva-payment-iconshyva-compile-tailwind-css skill with the target theme.After applying all changes, output a summary of modifications:
Display all files that were created or modified during this component installation. Use the tracking from Step 5 to label each file correctly:
(created) : File did not exist before and was newly created
(updated) : File already existed and was overwritten
Modified files:
If XML configuration was added to {theme_path}/etc/view.xml, parse the XML block from the README and display a table of options:
# Extract the XML config block from README and parse it
php <skill_path>/scripts/parse_readme_xml.php --format=table < xml_block.txt
The table shows each option with columns:
magnifier.enable)Example output (common prefix like gallery. is automatically stripped):
Option | Value | Description
---------------------+------------+---------------------------------------------------
nav | thumbs | Gallery navigation style (false/thumbs/counter)
magnifier.enable | false | Turn on/off magnifier (true/false)
For markdown output (e.g., when creating documentation), use --format=md.
{hyva_ui_path}/components/{component}/{variant}/
├── README.md # Instructions
├── media/ # Preview images
└── src/ # Files to copy to theme
See references/components.md for the full component catalog (only show non-CMS section to users).
Weekly Installs
155
Repository
GitHub Stars
59
First Seen
Jan 27, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
github-copilot153
opencode149
codex149
gemini-cli145
amp144
kimi-cli144
Laravel架构模式指南:生产级开发模式与最佳实践
1,100 周安装