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§
- UseSkill
Tool ToolExecutorthat lazily fetches a named skill’s full Markdown body.
Constants§
- USE_
SKILL_ TOOL_ NAME - The stable tool name for
UseSkillTool(matchesname()/the schema’sfunction.nameverbatim).