API Reference
skillTool
function skillTool(registry): Tool;Defined in: skills/skill-tool.ts:59
Build the skill tool bound to a SkillRegistry.
Parameters
| Parameter | Type | Description |
|---|---|---|
registry | SkillRegistry | The SkillRegistry whose skills can be disclosed. |
Returns
A Tool named skill ready to pass to the agent loop.
Remarks
Pair it with the registry's catalog in the system prompt and its flattened tools in the run:
tools: [skillTool(skills), ...skills.tools(), ...coreTools]Calling it with an unknown name throws (listing what is registered); the loop
turns that into the usual isError tool result the model can read and recover
from, rather than failing the run.