AGENT SKILL
script-example
Example skill demonstrating script execution capabilities. Use when you need to demonstrate how to execute shell, Python, or PHP scripts from within a skill.
使用场景Skill与智能体开发
- License 许可
- MIT
- 最近更新
- 2026-06-24
- Stars
- ★ 67
- Forks
- 24
01 前言 Front Matter
- name
- script-example
- license
- MIT
- metadata
- { "author": "Guikingone", "version": "1.0" }
- description
- Example skill demonstrating script execution capabilities. Use when you need to demonstrate how to execute shell, Python, or PHP scripts from within a skill.
02 资源文件 1
- 许可证LICENSE.txt1.0 KB
03 SKILL.md 正文
Script Example Skill
This skill demonstrates how to execute scripts from within a skill using the executeScript method.
Available Scripts
hello.sh- Simple bash script that prints a greetinganalyze.py- Python script that performs basic data analysisprocess.php- PHP script that processes command-line arguments
Usage
To execute a script from this skill:
$tool = new SkillTool($loader, 'script-example');
$result = $tool->executeScript('hello.sh');
To execute a script with arguments:
$result = $tool->executeScript('process.php', ['arg1', 'arg2']);
Script Execution Features
- Automatic interpreter detection based on file extension
- Support for bash (.sh), Python (.py), PHP (.php), Node.js (.js), and Ruby (.rb)
- Capture of both stdout and stderr
- Configurable timeout (default: 60 seconds)
- Proper error handling and reporting