Skip to content

Skills and Capability

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.

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.

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:

---
{
  "name": "cap_lua",
  "description": "Write, run, and manage Lua scripts.",
  "metadata": {
    "cap_groups": ["cap_lua"]
  }
}
---

Activating a Skill does two things:

  1. Injects the SKILL.md body into conversation history through the activate_skill tool result (knowledge).
  2. Makes the metadata.cap_groups entries 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.

claw_skill Skills layout, SKILL.md metadata, and activation plumbing
cap_skill activate_skill tool and cache-friendly Skill document injection
Skills guide Manual and Agent workflows plus file format examples