Skills and Capability
Capability: tool layer
Section titled “Capability: tool layer”A Capability is a tool bundle the LLM can call. Each cap_* module implements a feature (Lua, IM, files, …) and registers a Capability Group with claw_cap.
On every LLM request, claw_cap_tools_provider injects only tools from groups that are visible for the session—hidden groups do not exist in context. That avoids dumping unrelated tools.
Skills: knowledge layer
Section titled “Skills: knowledge layer”A Skill is a Markdown file describing how to use a feature, workflows, or behavioral contracts. claw_skill injects the Skills catalog into claw_core through a context provider:
| Provider | Injected content | Always on |
|---|---|---|
claw_skill_skills_list_provider | All Skill name and description values | yes |
Before activation the LLM only sees summaries. After calling activate_skill, the full Skill document is injected into conversation history through the tool result instead of the system prompt, keeping the prompt-cache prefix stable. Activation is per session and persisted on disk across reboots.
Relationship and differences
Section titled “Relationship and differences”Capabilities expose tool signatures without prose guides; Skills carry guides without executable tools—they complement each other:
| Capability | Skill | |
|---|---|---|
| Nature | Tools (functions) | Knowledge (context) |
| Carrier | C code (cap_*) | Markdown files |
| Role | Lets the LLM do | Teaches the LLM how |
| Lifecycle | Registered at boot; visibility per group | Activate on demand; persisted |
They link through metadata.cap_groups in SKILL.md frontmatter:
Activating a Skill does two things:
- Injects the
SKILL.mdbody into conversation history through theactivate_skilltool result (knowledge). - Makes the
metadata.cap_groupsentries visible for the session (tools).
Skill documents are no longer injected into the system prompt. They enter context through tool results, keeping the prompt-cache prefix stable.