Skip to content

hyva-cms-components-dump

Dump all Hyvä CMS components from active modules. This skill should be used when the user wants to list all CMS components, view available components, debug component configurations, or see the merged components.json output. Trigger phrases include "list cms components", "dump components", "show all components", "view cms components", "components.json dump".

Install

npx skills add https://github.com/hyva-themes/hyva-ai-tools --skill hyva-cms-components-dump
SKILL.md

Hyvä CMS Component Dump

Lists the Hyvä CMS components available in a Magento 2 project, merged across active modules.

Command execution: Use the hyva-exec-shell-cmd skill to detect the environment and determine the command wrapper. Run all commands below from the Magento project root.

Step 1: Prefer the bin/magento CLI commands

Modern Hyvä CMS ships console commands that report the live, project-accurate set of components (reflecting enabled state, plugins, and overrides). Prefer these.

Check availability once, then use what exists:

# via the detected wrapper, e.g. warden env exec -T php-fpm bash -c "bin/magento list hyva:cms"
bin/magento list hyva:cms
  • bin/magento hyva:cms:describe-components — describe enabled CMS components
  • bin/magento hyva:cms:list-disabled-components — list disabled CMS components

These run through the standard bin/magento wrapper (in the project's dev container); no bundled script and no host PHP are involved.

Step 2: Fallback — bundled dump script

If the hyva:cms:* commands are not available (older Hyvä CMS), fall back to the bundled scripts/dump_cms_components.php. It requires app/etc/config.php, so it needs a PHP interpreter — run it via the pattern documented in the hyva-exec-shell-cmd skill ("Running a Bundled Skill Script Inside the Environment"): stream the script into the interpreter over stdin, e.g.

# via the detected wrapper, working directory = project root
cat <skill_path>/scripts/dump_cms_components.php | warden env exec -T php-fpm bash -c "php /dev/stdin"

and capture stdout. The script locates the Magento root via getcwd(), so no temp file, mount, or cleanup is involved.

Output format: A single JSON object containing all merged CMS component definitions.

How the fallback script works

  1. Reads module configuration from app/etc/config.php to get the ordered list of modules
  2. Filters active modules - only modules with value 1 are included (disabled modules are skipped)
  3. Locates components.json files in:
    • app/code/{Vendor}/{Module}/etc/hyva_cms/components.json
    • vendor/{vendor-name}/{package-name}/*/etc/hyva_cms/components.json
  4. Maps paths to module names by reading each module's etc/module.xml
  5. Merges JSON objects in module load order as declared in config.php
  6. Outputs the result as formatted JSON

Module Load Order

Components are merged in the exact order modules appear in app/etc/config.php. Later modules can override components from earlier modules by using the same component key.

Example Output

{
    "text_block": {
        "label": "Text Block",
        "category": "Content",
        "template": "Hyva_CmsBase::elements/text-block.phtml",
        ...
    },
    "feature_card": {
        "label": "Feature Card",
        "category": "Elements",
        "template": "Custom_Module::elements/feature-card.phtml",
        ...
    }
}

Integration with Other Skills

This skill can be used to:

  • Debug which components are available in the CMS editor
  • Verify component registration after creating new components
  • Check for component name conflicts between modules
  • Export component definitions for documentation

Related skills

hyva-alpine-componenthyva-themesWrite 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-child-themehyva-themesCreate 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".hyva-cms-componenthyva-themesCreate 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-custom-fieldhyva-themesCreate custom field types and field handlers for Hyvä CMS components. Use when the user mentions Hyvä, Hyva, or CMS together with custom field, custom input, or modal selector (e.g. hyva custom field, custom cms field, hyva modal selector, custom hyva input, custom cms input). Do not use for generic form or UI work outside Hyvä CMS.

← All skills

Search skills and MCP servers

Search across 31,816 skills and MCPs