Agent Skills
› espressif/esp-claw
› skills_lab_downloader
skills_lab_downloader
GitHub用于从 ESP-Claw Skill Hub 下载并安装技能。流程包括验证技能名称、检查 HTTP 权限、获取元数据及硬件兼容性,最后执行安装脚本并可选注册。
Trigger Scenarios
用户想要从 ESP-Claw 技能中心下载或安装技能
用户提供了确切的技能名称需要安装
Install
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_mode": "readonly"
},
"description": "Download a skill from the ESP-Skill hub by exact skill name, verify required peripherals against board_hardware_info, and save it into the on-device skills directory."
}
Skills Lab Downloader
Use this skill when the user wants to install a skill from the ESP-Claw's Skill hub at skills-lab.esp-claw.com.
When to use
- The user wants to download or install a skill from the ESP-Claw's Skill hub.
- The user already knows the exact skill name, or needs a reminder that installation requires the exact skill name instead of the visible title.
Hard rules
- Installation requires the exact skill name, not the skill title.
- A valid skill name contains only
A-Z,a-z,0-9,_, or-. - Before downloading, make sure
cap_http_requestis enabled and available. If it is unavailable, stop and tell the user to enable HTTP request first. - Use
{CUR_SKILL_DIR}/scripts/download_skill.luafor hub download requests. Do not manually recreate the HTTP flow outside this script. - First fetch
_metadata.jsonand return it to yourself as a raw JSON string. Treat that string as the source of truth for install decisions. - If metadata fetch returns a 404 result, tell the user the skill does not exist and stop.
- If metadata fetch fails with an allowlist error such as
HTTP allowlist is emptyorhost 'skills-lab.esp-claw.com' is not in allowlist, tell the user to add*.esp-claw.comto the Web Console allowlist and stop. - Before installation, inspect
metadata.peripherals. If it is non-empty, activateboard_hardware_infoand compare every listed peripheral against the current board device inventory. - If one or more required peripherals are unavailable, do not install by default. Tell the user which peripherals are missing and stop unless the user explicitly asks to force install.
- Only after compatibility is confirmed, or the user explicitly approves force install, run the install step.
- After the install script succeeds, registration is optional: call
register_skillonly when the user or workflow needs the skill to be available toactivate_skillimmediately. - If
register_skillis called and succeeds, tell the user the skill has been installed and registered. If it is skipped, tell the user the skill has been installed and will become available after the next registry reload or device restart. - Do not ask Lua to parse
_metadata.json. The model must read the JSON string, make the install decision, and pass the file lists to Lua as structured args.
Workflow
- Ask for the exact skill name if the user did not provide it.
- Validate that the skill name matches
^[A-Za-z0-9_-]+$. - Fetch metadata with
lua_run_script:
{
"path": "{CUR_SKILL_DIR}/scripts/download_skill.lua",
"args": {
"action": "fetch_metadata",
"skill_name": "example-skill"
}
}
- Read the returned JSON string from
_metadata.json. - Check
metadata.peripherals:- If empty, continue.
- If non-empty, read
board_hardware_infoand verify every peripheral is available on this device.
- If peripherals are missing, explain the mismatch and ask whether the user wants to force install.
- Install by passing the validated file lists from
_metadata.json:
{
"path": "{CUR_SKILL_DIR}/scripts/download_skill.lua",
"args": {
"action": "install",
"skill_name": "example-skill",
"skill_name_from_metadata": "example-skill",
"extra_files": {
"references": ["ref1.md"],
"scripts": [],
"assets": []
}
}
}
- If immediate activation is needed after the install script succeeds, call
register_skill:
{
"skill_id": "example-skill",
"file": "example-skill/SKILL.md"
}
- Report completion to the user. If registration was skipped, mention that the skill may require the next registry reload or device restart before
activate_skillcan use it.
Notes
- During installation, files are streamed directly from
http_requestinto their target paths withsave_path; the script does not load downloaded skill files into Lua memory before writing them. - If any streamed file exceeds the downloader's file-size limit, installation fails and the partial file is removed.
- After all files are saved, the model can call
register_skillwhen immediate activation is needed; without this optional step, the skill becomes available after the next registry reload or device restart. extra_files.references,extra_files.scripts, andextra_files.assetsare additional files that must be downloaded when present.- The installer script expects the model to pass the validated
extra_filesobject directly from_metadata.json. - Do not guess or normalize a similar-looking title into a skill name. Ask the user for the exact skill name when needed.
Version History
- 06eb576 Current 2026-07-24 19:54


