Skip to contents

Loads a skill from a directory containing SKILL.yaml (metadata) and optionally SKILL.md (system prompt extension).

Usage

skill_load(path, check_requirements = TRUE)

Arguments

path

Path to the skill directory

check_requirements

If TRUE (default), verify requirements are met

Value

A Skill object

Details

The skill directory should contain:

SKILL.yaml (required):

name: my_skill
version: "1.0.0"
description: What this skill does
requires:
  packages: [dplyr, ggplot2]
  providers: [openai, anthropic]
tools:
  - name: my_tool
    file: tools.R
    function: tool_my_tool

SKILL.md (optional): Markdown content that will be appended to the agent's system prompt when this skill is loaded.

tools.R (optional): R file containing tool definitions referenced in SKILL.yaml.

Examples

if (FALSE) { # \dontrun{
# Load a skill
skill <- skill_load("path/to/my_skill")

# Add to agent
agent$load_skill(skill)
} # }