run_skill_script
Execute scripts within skill directories with automatic dependency installation, environment variable loading, and argument passing for Python, Bash, and other executable files.
Instructions
Execute a script or executable program within a skill directory with optional arguments and automatic dependency management.
This tool runs scripts in multiple languages and automatically manages dependencies:
SUPPORTED LANGUAGES:
Python: Automatically installs PEP 723 inline dependencies via 'uv run' if declared in the script
Bash: Executes shell scripts (.sh files)
Other: Any executable file with proper shebang line
FEATURES:
Automatic dependency installation: Python scripts with PEP 723 metadata (/* script */ dependencies) are run with 'uv run' automatically
Environment variables: Loads skill-specific .env file and injects variables into script environment
Working directory: Can specify a subdirectory to run the script from
Arguments: Pass command-line arguments to the script
Output capture: Returns stdout, stderr, and exit code
PARAMETERS:
skill_name: The name of the skill directory (e.g., 'weather-skill')
script_path: Relative path to the script (e.g., 'scripts/fetch_weather.py', 'bin/process.sh')
args: Optional list of command-line arguments to pass to the script (e.g., ['--verbose', 'input.txt'])
working_dir: Optional working directory for execution (relative to skill root)
BEHAVIOR:
Python scripts with PEP 723 metadata are detected automatically and run with 'uv run'
Environment variables from skill's .env file are available to the script
Script must be executable or have proper shebang line
Script path is relative to the skill directory
RETURNS: Script execution result with:
Exit code (0 = success, non-zero = failure)
STDOUT (standard output)
STDERR (error output)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
args | No | Optional command-line arguments to pass to the script | |
script_path | Yes | Relative path to the script within the skill directory | |
skill_name | Yes | Name of the skill | |
working_dir | No | Optional working directory for script execution |