skills/hyva-exec-shell-cmd/SKILL.md
Utility skill to detect Magento development environment and determine command wrapper. This skill should be used by other skills that need to execute shell commands in the Magento environment. It detects Warden, docker-magento, DDEV, and local environments and provides the appropriate command wrapper.
npx skillsauth add hyva-themes/hyva-ai-tools hyva-exec-shell-cmdInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This utility skill detects the Magento development environment and provides the appropriate command wrapper for executing shell commands.
Other skills should reference this skill when they need to execute commands in the Magento environment. The detected wrapper ensures commands run in the correct context (container or local).
Important: Execute this script from the Magento project root directory, or provide the path as an argument.
Run this detection once at the start of any skill that needs to execute shell commands:
<skill_path>/scripts/detect_env.sh [magento_root_path]
Where <skill_path> is the directory containing this SKILL.md file (e.g., .claude/skills/hyva-exec-shell-cmd).
The optional magento_root_path argument specifies the Magento installation directory. If omitted, the script uses the current working directory.
Output: warden, docker-magento, ddev, or local
Based on detected environment, wrap commands as follows:
| Environment | Command Wrapper | Description |
|-------------|-----------------|-------------|
| Warden | warden env exec -T php-fpm bash -c "<command>" | Docker environment managed by Warden |
| docker-magento | bin/clinotty bash -c "<command>" | Mark Shust's docker-magento setup |
| DDEV | ddev exec <command> | DDEV containerized environment |
| Local | Run <command> directly | Native environment without containers |
# Warden
warden env exec -T php-fpm bash -c "bin/magento cache:clean"
# docker-magento
bin/clinotty bash -c "bin/magento cache:clean"
# DDEV
ddev exec bin/magento cache:clean
# Local
bin/magento cache:clean
# Warden
warden env exec -T php-fpm bash -c "cd vendor/hyva-themes/magento2-default-theme/web/tailwind && npm run build"
# docker-magento
bin/clinotty bash -c "cd vendor/hyva-themes/magento2-default-theme/web/tailwind && npm run build"
# DDEV
ddev exec bash -c "vendor/hyva-themes/magento2-default-theme/web/tailwind && npm run build"
# Local
cd vendor/hyva-themes/magento2-default-theme/web/tailwind && npm run build
Some commands run on the host system and should NOT be wrapped:
composer commands (runs on host, not in container)git commandsls, find, cp for files accessible from host)warden CLI commandsddev CLI commandsSkills that need to execute commands should:
hyva-exec-shell-cmd skill to determine the command wrapper"documentation
Apply Hyva UI template-based components to a Hyvä theme. This skill should be used when the user wants to add, install, or apply a Hyva UI component (such as header, footer, gallery, menu, minicart, etc.) to their Hyvä theme. It lists available non-CMS components and their variants, displays component README instructions, and copies component files to the theme directory.
data-ai
List all Hyvä theme paths in a Magento 2 project. This skill should be used when the user wants to find Hyvä themes, list available themes, discover theme paths, or when other skills need to locate Hyvä themes. Trigger phrases include "list hyva themes", "find themes", "show themes", "available themes", "theme paths".
development
Generate responsive image code for Hyvä Theme templates using the Media view model. This skill should be used when the user wants to render images in a Hyvä template, create responsive picture elements, add hero images, product images, or any image that needs responsive breakpoints. Trigger phrases include "render image", "add image to template", "responsive image", "picture element", "hero image", "responsive banner", "image for mobile and desktop", or "banner image".
development
Write Playwright tests for Hyvä themes with Alpine.js components. This skill should be used when writing e2e tests, creating page objects, or debugging selector issues in Playwright tests for Hyvä Magento storefronts. Trigger phrases include "write playwright test", "playwright alpine", "test hyva page", "e2e test", "playwright selector".