skills

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package skills discovers and parses application-owned SKILL.md files: one skill per directory, each with a SKILL.md. Loader reads a local directory; package workspace reads one on the agent's workspace. The agent reads instructions only through read_skill.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Catalog

func Catalog(loaded []Skill) string

Catalog creates the small prompt section shown before a skill is selected. Full instructions are intentionally omitted to preserve context window.

Types

type Loader

type Loader struct {
	Root string
}

Loader loads one skill per immediate child directory of the local directory Root. An empty Root, or one that does not exist, loads nothing. A skills directory in another store (the agent's workspace) uses Collect.

func (Loader) Load added in v0.2.0

func (l Loader) Load(ctx context.Context) ([]Skill, error)

Load implements SkillLoader.

type Skill

type Skill struct {
	Name         string
	Description  string
	Instructions string
	// Path is where SKILL.md was read from.
	Path string
}

func Collect added in v0.5.0

func Collect(ctx context.Context, names []string, read func(ctx context.Context, name string) (data []byte, path string, err error)) ([]Skill, error)

Collect parses the SKILL.md of each skill directory in names, which read returns with the path it is at, and returns the skills sorted by name. Two skills with one name is an error.

type SkillLoader

type SkillLoader interface {
	Load(ctx context.Context) ([]Skill, error)
}

SkillLoader discovers skills for the harness. A loader owns its source configuration; callers only provide the lifetime context for the load.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL