skill_creator
GitHub管理设备端运行时 Skill 的创建、更新与删除。通过解析 DATA 根目录,遵循包规范设计文件结构,编写 Lua 脚本或指令,并调用 publish_skill 完成发布。不处理固件源码修改。
触发场景
安装
npx skills add espressif/esp-claw --skill skill_creator -g -y
SKILL.md
Frontmatter
{
"name": "skill_creator",
"metadata": {
"cap_groups": [
"cap_files",
"cap_lua",
"cap_skill_manage"
]
},
"description": "Create, update, or remove an on-device runtime Skill when the user explicitly asks to manage a Skill; not for generic feature requests, Apps, or native firmware capabilities."
}
Skill Creator
Use this skill only when the user explicitly asks to create, update, or remove an on-device runtime Skill.
Do not activate it for a generic request such as "add a feature" or "support X". First use an existing domain Skill when one covers the request. Use app_creator for launcher-visible Apps. If the request needs a new C capability, driver, Kconfig option, firmware component, or build-time SYSTEM Skill, explain that firmware development is required and use plan_mode when available.
This workflow manages runtime Skills under the writable DATA root. It does not edit firmware source files or create native capabilities.
Resolve The Runtime Skills Root
Before reading or writing a runtime Skill, run:
{"path":"{CUR_SKILL_DIR}/scripts/resolve_skills_root.lua","args":{}}
Treat the returned absolute path as <SKILLS_ROOT>. Do not assume /fatfs; DATA may be mounted on an SD card. If the path cannot be resolved, report the error and stop.
Choose The Skill Shape
- Use an instruction-only Skill when existing capabilities already provide the required operations.
- Add references when substantial guidance is needed only for part of the workflow.
- Add one or more Lua scripts when reusable or deterministic logic is needed and the required Lua modules already exist.
- Do not claim that a Skill or Lua script adds firmware support that is not already compiled into the device.
For Lua-backed Skills, also activate lua_package_authoring and follow its Skill-script rules. Keep this skill responsible for the package layout and final publication.
Skill Contract
Before creating or updating a Skill, read {CUR_SKILL_DIR}/references/skill-package-spec.md and follow the complete package contract. Do not load the reference for removal-only requests.
Store each runtime Skill under <SKILLS_ROOT>/<skill_id>/. Do not create or overwrite a Skill whose id already exists unless the user explicitly requested that exact update.
Minimal document:
---
{
"name": "skill_id",
"description": "Describe the user request this Skill handles.",
"metadata": {
"cap_groups": []
}
}
---
After the frontmatter, add exactly one H1 title and only the instructions needed to perform the documented workflow.
Create Or Update
- Resolve
<SKILLS_ROOT>and inspect the target Skill before changing it. - Read the package spec and confirm that the requested behavior can be implemented with currently available capabilities or Lua modules.
- Design the smallest complete set of files. Do not add placeholder references, scripts, or assets.
- For a new Skill, write supporting files first and
SKILL.mdlast. For an update, inspect the existing payload, preserve unrelated content, write changed supporting files first, and updateSKILL.mdlast. - Read back the changed text files and check paths, frontmatter JSON, Skill id, capability groups, and documented script arguments.
- Call
publish_skillwith only the final id:
{"skill_id":"skill_id"}
- Treat the tool result as authoritative. Report publication errors directly and do not claim success when publication fails.
Publishing refreshes the runtime registry; it does not build firmware or add missing capabilities.
Remove
Remove a Skill only when the user explicitly requests deletion of that exact runtime Skill. Inspect the target first, then call:
{"skill_id":"skill_id"}
with remove_skill. If the tool reports readonly_skill, explain that firmware-baked SYSTEM Skills cannot be removed at runtime.
版本历史
-
36b377f
当前 2026-11-02 21:37
工作流从使用 register_skill 注册改为使用 publish_skill 发布;明确限定仅管理 DATA 根下的运行时 Skill,排除固件源码和原生能力开发;细化了 Skill 形状选择逻辑。
- 06eb576 2026-07-24 19:54


