addSkill
Load and activate a skill on this agent. Skills are pluggable capability modules that
register their own tools, prompts, hints, and global data. The addSkill() method
takes a SkillBase instance (not a string name).
This is an async method that returns Promise<this>. Use await when calling.
addSkill() fails closed: it throws if a duplicate non-multi-instance
skill is added, if required environment variables or packages are missing,
if the skill’s parameter schema is empty, or if the skill’s setup()
returns false. The method also registers any DataMap-style tools the
skill exposes via getDataMapTools().
Check available skills with listSkills() or consult the
skills catalog.
Parameters
skill
A skill instance to add to the agent. Skills extend SkillBase and provide
tools, prompt sections, hints, and global data.
Returns
Promise<this> — Returns this for method chaining (async).