
Hyva Exec Shell Cmd
- 820 installs
- 78 repo stars
- Updated July 31, 2026
- hyva-themes/hyva-ai-tools
hyva-exec-shell-cmd is a utility Claude Code skill that detects Magento development environments and returns the correct shell command wrapper for developers who need agent skills to run CLI commands across Warden, DDEV,
About
hyva-exec-shell-cmd is a utility skill from hyva-themes/hyva-ai-tools that other Magento agent skills reference before executing shell commands. It auto-detects whether the project runs under Warden, docker-magento, DDEV, or a plain local install, then supplies the appropriate command wrapper so bin/magento, composer, and module scripts run inside the correct container or host context. Developers reach for hyva-exec-shell-cmd when building or maintaining Hyvä-themed Magento stores with AI agents that would otherwise fail on environment-specific path and exec differences. The skill is designed as shared infrastructure: consuming skills call it first instead of hard-coding docker exec or warden shell prefixes.
- Automatically detects Warden, docker-magento, DDEV, and local Magento environments
- Returns correct command wrapper for each environment type
- Designed as a reusable dependency for other Magento agent skills
- Runs from project root or accepts explicit Magento path argument
- Eliminates environment-specific command logic from downstream skills
Hyva Exec Shell Cmd by the numbers
- 820 all-time installs (skills.sh)
- +29 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #329 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
- Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/hyva-themes/hyva-ai-tools --skill hyva-exec-shell-cmdAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 820 |
|---|---|
| repo stars | ★ 78 |
| Last updated | July 31, 2026 |
| Repository | hyva-themes/hyva-ai-tools ↗ |
How do agent skills run Magento CLI across Docker setups?
So other agent skills can reliably run shell commands inside Magento environments without worrying about Docker, Warden, DDEV or local differences.
Who is it for?
Magento developers using Claude or Cursor agent skills on Hyvä projects where Warden, DDEV, docker-magento, or local environments differ.
Skip if: Developers outside Magento or PHP e-commerce stacks should skip hyva-exec-shell-cmd because it only resolves Magento-specific environment wrappers.
When should I use this skill?
Trigger when an agent skill must execute bin/magento, composer, or module CLI inside an unknown Magento dev environment.
What you get
Detected environment type, correct command wrapper string, and reliably executed Magento shell commands
- Detected environment label
- Shell command wrapper
- Executed Magento CLI output
Files
Execute Shell Commands in Magento Environment
This utility skill detects the Magento development environment and provides the appropriate command wrapper for executing shell commands.
Usage
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).
Step 1: Detect Environment
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
Step 2: Apply Command Wrapper
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 |
Examples
Single command
# 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:cleanCommand with directory change
# 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 buildCommands That Do NOT Require Wrapping
Some commands run on the host system and should NOT be wrapped:
composercommands (runs on host, not in container)gitcommands- File operations on the host filesystem (
ls,find,cpfor files accessible from host) wardenCLI commandsddevCLI commands
Integration Pattern
Skills that need to execute commands should:
1. Reference this skill: "Use the hyva-exec-shell-cmd skill to determine the command wrapper" 2. Detect environment once using Step 1 3. Store the wrapper pattern for use throughout the skill 4. Apply the wrapper to all container commands per Step 2
<!-- Copyright © Hyvä Themes https://hyva.io. All rights reserved. Licensed under OSL 3.0 -->
#!/bin/bash
# Detect Magento development environment type
# Outputs: warden, docker-magento, ddev, or local
# Usage: detect_env.sh [magento_root_path]
# Change to specified directory or current directory
cd "${1:-.}" 2>/dev/null || { echo "local"; exit 0; }
if grep -q "^WARDEN_ENV_NAME=" .env 2>/dev/null; then
echo "warden"
elif [ -x "bin/clinotty" ]; then
echo "docker-magento"
elif [ -f ".ddev/config.yaml" ] && command -v ddev >/dev/null 2>&1; then
echo "ddev"
else
echo "local"
fi
Related skills
FAQ
Which Magento environments does hyva-exec-shell-cmd detect?
hyva-exec-shell-cmd detects Warden, docker-magento, DDEV, and plain local Magento installations. It inspects the project context and returns the matching command wrapper so downstream agent skills execute CLI commands in the correct runtime.
Why should other agent skills reference hyva-exec-shell-cmd?
hyva-exec-shell-cmd centralizes Magento environment detection so consuming skills avoid brittle hard-coded docker exec or warden shell prefixes. Other hyva-ai-tools skills call it first, then run bin/magento or composer through the returned wrapper.