Agent Skills
› espressif/esp-claw
› skills_lab_downloader
skills_lab_downloader
GitHub从 ESP-Claw Hub 下载指定 Skill 或 App,验证元数据与硬件外设兼容性,执行文件安装并发布。
触发场景
用户请求下载特定 ID 的 Skill 或 App
需要安装来自 skills-lab.esp-claw.com 的资源包
安装
npx skills add espressif/esp-claw --skill skills_lab_downloader -g -y
SKILL.md
Frontmatter
{
"name": "skills_lab_downloader",
"metadata": {
"cap_groups": [
"cap_lua",
"cap_http_request",
"cap_boards",
"cap_skill_manage",
"cap_app_manage"
]
},
"description": "Download a Skill or App from the ESP-Claw hub by exact kind and id, check required peripherals, and publish it on the device."
}
Skills Lab Downloader
Download a Skill or App by its exact kind and id from skills-lab.esp-claw.com.
Rules
- Require
kind(skillorapp) and the exact packageid. Never infer kind from a title or default to Skill. If unknown, useskills_lab_searchor ask the user. - Use
{CUR_SKILL_DIR}/scripts/download_package.luafor both metadata and file downloads. Enablecap_http_request; if the host is blocked, tell the user to add*.esp-claw.comto the Web Console HTTP allowlist. - Read the returned metadata yourself; do not ask Lua to parse JSON. Verify
kindandnamematch the requested kind and id. Stop on missing or mismatched metadata, HTTP errors, or missingfiles. - Before installation, compare
metadata.peripheralswithboard_hardware_info. If required peripherals are missing, stop unless the user explicitly approves force installation. - Pass the complete metadata
filesarray unchanged. It includes the manifest and nested resource paths; do not useextra_filesor reconstruct a list from prose. - After all downloads succeed, call
publish_appfor an App orpublish_skillfor a Skill. Never publish after a download failure. Only report installation complete after publication succeeds; otherwise report that files were downloaded but publication failed.
Workflow
- Fetch metadata using
lua_run_script:
{
"path": "{CUR_SKILL_DIR}/scripts/download_package.lua",
"args": { "action": "fetch_metadata", "kind": "app", "id": "example-app" }
}
- Check package identity and peripherals, then install using the exact
filesreturned by the server. Settimeout_msto 300000 for the complete download; the default 60-second script timeout may be too short for resource-heavy Apps. For example:
{
"path": "{CUR_SKILL_DIR}/scripts/download_package.lua",
"timeout_ms": 300000,
"args": {
"action": "install",
"kind": "app",
"id": "example-app",
"files": ["launcher.json", "scripts/main.lua", "assets/audio/tone.pcm"]
}
}
- On success, call
publish_appwith{"app_id":"example-app"}. For a Skill, usekind: "skill"in both script calls and finish withpublish_skill({"skill_id":"example-skill"}).
Storage and failures
- Skills use
/raw/<id>/on the server and<DATA>/skills/<id>/locally;SKILL.mdis required. - Apps use
/raw/apps/<id>/on the server and<DATA>/apps/<id>/locally;launcher.jsonis required. - Files stream directly to storage with a 20-second request timeout and a 10 MiB per-file limit. Nested directories are created automatically; paths must remain inside the package.
- A failed or truncated download is removed. Previously downloaded files may remain; installation is not atomic and retrying overwrites files. Publication does not launch the App or activate the Skill.
版本历史
- 36b377f 当前 2026-11-02 21:37


