Skip to main content

Module skill

Module skill 

Source
Expand description

use_skill tool — the on-invoke half of progressive-disclosure skill loading (#2069).

Why: The prompt only ever injects the cheap skill metadata catalog (skills::format_skill_catalog); an agent that decides a listed skill is relevant needs a way to actually fetch its full body. UseSkillTool is that seam — a thin ToolExecutor wrapping any SkillResolver, so the LLM’s tool call is the “invoke” moment that triggers the lazy disk read. What: UseSkillTool::new(resolver) takes any Arc<dyn SkillResolver> (production: skills::FsSkillResolver); execute looks up the {"name": ...} argument via resolver.resolve() and returns the body, or a recoverable error naming the unknown skill. Test: tools::skill::tests::* — resolves a known skill, errors on an unknown one, errors on a missing name argument, schema shape.

Structs§

UseSkillTool
ToolExecutor that lazily fetches a named skill’s full Markdown body.

Constants§

USE_SKILL_TOOL_NAME
The stable tool name for UseSkillTool (matches name()/the schema’s function.name verbatim).