Run scripts in the skill directory. Reusable tools must be a complete skill directory, not a single .py file in the workspace root.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| skill_name | string | Yes | Skill name |
| script_name | string | Yes | Script file name (e.g., get_time.py) |
| args | array | No | Command-line arguments |
| cwd | string | No | Working directory; defaults to the skill directory |
Workflow
- First use
get_skill_infoto learn about available scripts - Specify the script name and arguments to execute
Skill Layout Rules
When creating or fixing reusable tools, you must use the following structure:
skills/<skill-id>/
SKILL.md
news_searcher.py
scripts/
main.py
script_namecan only point to scripts within the skill directory, for examplescripts/main.pyormain.py。- Python modules imported by the entry script should be placed in the same skill directory.
- Do not treat
news_searcher.pyin the workspace root as part of the skill; that is just a temporary script and will not execute stably withrun_skill_script. - After creating the directory and files, call
load_skillorreload_skill, then useget_skill_infoto verify the list of executable scripts.
Related Skills
get-skill-info: view available scriptslist-skills: list all skills