NylorunDocsBeta
BuildRunDeployReferenceMore

Skills

Load an Agent Skills catalog folder into a capability.

Load Agent Skills from a local catalog folder with skills(path):

import { Agent, skills } from "@nylorun/agents";

export const assistant = Agent({
  id: "assistant",
  name: "Order assistant",
  instructions: "Use lookup_order for orders.",
  tools: [lookupOrder],
}).use(skills("./assistant-skills"));

Each subdirectory under the catalog must contain a SKILL.md with YAML frontmatter (name, description) per Agent Skills. Supporting files (for example references/) are available through read_skill_resource after load_skill.

assistant-skills/
  lookup-order/SKILL.md
  refund/
    SKILL.md
    references/policy.md

The helper sets both the manifest skill catalog and the on-disk skill records so you do not duplicate content. The engine injects:

ToolInputRole
load_skill{ name }Skill instructions and the resource list
read_skill_resource{ name, path }A supporting file, when the skill has resources

Capability id defaults to the catalog directory basename. Override it with skills("./assistant-skills", { id: "order-skills" }).

plugin() can also contribute skills from an Agent Plugin package. See Plugins.

Next step

On this page