Token导航 LogoToken导航TokenDH.com
开发可写文件github未标认证来源可访问许可证需确认审计通过

hyva-create-module海沃创建模块

Agent Skill

hyva-create-module 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

7,056

周安装

260

GitHub Stars

64

下载量

2,472
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:hyva-create-module(海沃创建模块)
来源仓库:https://github.com/hyva-themes/hyva-ai-tools
仓库路径:skills/hyva-create-module
安装命令:
npx skills add https://github.com/hyva-themes/hyva-ai-tools --skill hyva-create-module
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/hyva-themes/hyva-ai-tools --skill hyva-create-module

简介

hyva-create-module 处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,支持模块创建流程。

  • 适用于围绕仓库状态、代码变更或协作事项进行信息整理。
  • 可在 Codex、Claude、Cursor、Gemini CLI 中调用以获取项目上下文。
  • 需确认权限范围和维护状态,避免触发命令执行或文件写入。
  • 建议结合原始 README 核验具体功能和使用限制。

SKILL.md

Create Magento 2 Module

This utility skill creates new Magento 2 modules in app/code/. It is designed to be called by other skills that need module scaffolding.

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.

Parameters

When invoking this skill, the calling skill should provide:

ParameterRequiredDescription
vendorYesVendor name in PascalCase (e.g., Acme)
moduleYesModule name in PascalCase (e.g., CustomFeature)
descriptionNoModule description for composer.json (default: "[Vendor] [Module] module")
dependenciesNoArray of module dependencies for <sequence> in module.xml
composer_requireNoObject of composer requirements (package: version)

Workflow

Step 1: Validate Input

  • Verify vendor name is PascalCase (starts with uppercase, alphanumeric only)
  • Verify module name is PascalCase
  • Check that app/code/{Vendor}/{Module} does not already exist

Step 2: Create Directory Structure

app/code/{Vendor}/{Module}/
├── registration.php
├── composer.json
└── etc/
    └── module.xml

Step 3: Generate Files

registration.php

Use template assets/templates/registration.php.tpl:

  • Replace {{VENDOR}} with vendor name
  • Replace {{MODULE}} with module name

composer.json

Use template assets/templates/composer.json.tpl:

  • Replace {{VENDOR}} with vendor name (PascalCase)
  • Replace {{MODULE}} with module name (PascalCase)
  • Replace {{vendor_kebabcase}} with kebab-case, hyphenated vendor name
  • Replace {{module_kebabcase}} with kebab-case, hyphenated module name
  • Replace {{DESCRIPTION}} with description
  • Add entries from composer_require parameter to the require section

module.xml

Use template assets/templates/module.xml.tpl:

  • Replace {{VENDOR}} with PascalCase vendor name
  • Replace {{MODULE}} with PascalCase module name
  • Replace {{SEQUENCE}} with <sequence> block containing dependencies, or empty string if none

Step 4: Run Setup (Optional)

If the calling skill requests it, run bin/magento setup:upgrade using the hyva-exec-shell-cmd skill for the appropriate wrapper.

Error Handling

Abort module creation and report the error to the calling skill when:

ConditionAction
Vendor name not PascalCaseReport: "Invalid vendor name '{name}': must start with uppercase letter and contain only alphanumeric characters"
Module name not PascalCaseReport: "Invalid module name '{name}': must start with uppercase letter and contain only alphanumeric characters"
Directory already existsReport: "Module already exists at app/code/{Vendor}/{Module}"
Cannot create directoryReport: "Failed to create directory app/code/{Vendor}/{Module}: {error}"
Cannot write fileReport: "Failed to write {filename}: {error}"

If hyva-exec-shell-cmd skill is unavailable when Step 4 is requested, skip the setup:upgrade step and report: "Skipped setup:upgrade - hyva-exec-shell-cmd skill not available. Run manually: bin/magento setup:upgrade"

Template Placeholders

PlaceholderDescriptionExample
{{VENDOR}}Vendor name (PascalCase)Acme
{{MODULE}}Module name (PascalCase)CustomFeature
{{vendor_kebabcase}}Vendor name (kebab-case, split on capitals)acme
{{module_kebabcase}}Module name (kebab-case, split on capitals)custom-feature
{{DESCRIPTION}}Module descriptionAcme CustomFeature module
{{SEQUENCE}}Module sequence XML or empty<sequence><module name="Magento_Catalog"/></sequence>

PascalCase to kebab-case Conversion

Convert module names by inserting a hyphen before each capital letter and lowercasing:

PascalCasekebab-case
CustomFeaturecustom-feature
ShoppingCartGraphQlshopping-cart-graph-ql
CmsComponentscms-components
MyModulemy-module

Usage by Other Skills

Skills should reference this skill for module creation:

To create the module, use the `hyva-create-module` skill with:
- vendor: "Acme"
- module: "CmsComponents"
- dependencies: ["Hyva_CmsBase"]
- composer_require: {"hyva-themes/commerce-module-cms": "*"}

Example Output

For vendor Acme, module CmsComponents, with Hyva_CmsBase dependency:

app/code/Acme/CmsComponents/registration.php:

<?php
declare(strict_types=1);

use Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Acme_CmsComponents', __DIR__);

app/code/Acme/CmsComponents/composer.json:

{
    "name": "acme/module-cms-components",
    "description": "Acme CmsComponents module",
    "type": "magento2-module",
    "require": {
        "php": ">=8.1",
        "hyva-themes/commerce-module-cms": "*"
    },
    "autoload": {
        "files": ["registration.php"],
        "psr-4": {
            "Acme\\CmsComponents\\": ""
        }
    }
}

app/code/Acme/CmsComponents/etc/module.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Acme_CmsComponents">
        <sequence>
            <module name="Hyva_CmsBase"/>
        </sequence>
    </module>
</config>

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

40.03%
按下载量换算990

Claude

28.23%
按下载量换算698

Cursor

18.57%
按下载量换算459

Gemini CLI

10.71%
按下载量换算265

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills