Skip to main content

Module skill

Module skill 

Source
Expand description

Skill contract between a skill store and the nodes that use skills.

A skill is a package of instructions plus optional reference files and tool requests, loaded only when a task needs it. This module holds only the contract: the core never reads a skill from disk. A host registers a Skills service (for example the store of the graphrt-skill crate) and the agent node asks it what the skills an agent lists resolve to.

What a node gets for one run is an AttachedSkills:

  • catalog: one short line per skill for the system prompt;
  • runtime: a tool provider scoped to those skills, with LOAD_SKILL_TOOL and READ_SKILL_FILE_TOOL;
  • grants: the tools the owner granted each skill.

A skill never grants itself a tool. The grants come from the store, where the owner recorded them, and a node offers a granted tool to the model only after the skill was loaded in that run.

Structs§

AttachedSkills
What the skills an agent lists resolve to for one run.
SkillError
A skill could not be attached.
SkillToolGrant
A tool the owner granted to a skill.
Skills
Service registered in crate::node::Services: where nodes find skills.

Constants§

LOAD_SKILL_TOOL
Tool that returns the instructions of one skill. Argument: {"name": "<skill>"}.
READ_SKILL_FILE_TOOL
Tool that returns one file of a skill. Arguments: {"name": "<skill>", "path": "<file>"}.
SKILL_PROVIDER
Provider name of the skill tools in logs and tool references.

Traits§

SkillSource
A source of installed skills.