skills

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package skills discovers and parses application-owned SKILL.md files.

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 AWSS3Client

type AWSS3Client struct {
	Client *s3.Client
}

AWSS3Client adapts the AWS SDK S3 client to S3Client. Listing consumes all pages before returning so SkillLoader sees a complete source.

func (AWSS3Client) GetObject

func (c AWSS3Client) GetObject(ctx context.Context, bucket, key string) (io.ReadCloser, error)

func (AWSS3Client) ListObjects

func (c AWSS3Client) ListObjects(ctx context.Context, bucket, prefix string) ([]string, error)

type AzureBlobClient

type AzureBlobClient struct {
	Client *azblob.Client
}

AzureBlobClient adapts the Azure Blob SDK client to BlobClient.

func (AzureBlobClient) DownloadBlob

func (c AzureBlobClient) DownloadBlob(ctx context.Context, container, name string) (io.ReadCloser, error)

func (AzureBlobClient) ListBlobs

func (c AzureBlobClient) ListBlobs(ctx context.Context, container, prefix string) ([]string, error)

type BlobClient

type BlobClient interface {
	ListBlobs(ctx context.Context, container, prefix string) ([]string, error)
	DownloadBlob(ctx context.Context, container, name string) (io.ReadCloser, error)
}

BlobClient is the subset of an Azure Blob Storage client required by BlobLoader. Implementations can delegate to an Azure SDK client.

type BlobLoader

type BlobLoader struct {
	Client    BlobClient
	Container string
	Prefix    string
}

BlobLoader loads SKILL.md blobs from an Azure Blob Storage container.

func (BlobLoader) Load

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

Load implements SkillLoader.

type DirectoryLoader

type DirectoryLoader struct {
	Directories []string
}

DirectoryLoader loads one skill per immediate child directory under each root. It is the default when AgentOptions.SkillsLoader is nil.

func (DirectoryLoader) Load

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

Load implements Loader using LoadDirectories.

type Loader

type Loader = SkillLoader

Loader is kept as an alias for compatibility with earlier releases.

type S3Client

type S3Client interface {
	ListObjects(ctx context.Context, bucket, prefix string) ([]string, error)
	GetObject(ctx context.Context, bucket, key string) (io.ReadCloser, error)
}

S3Client is the subset of an S3 client required by S3Loader. Implementations can delegate to an SDK client and keep SDK-specific request types out of the skills package.

type S3Loader

type S3Loader struct {
	Client S3Client
	Bucket string
	Prefix string
}

S3Loader loads SKILL.md objects from an S3-compatible bucket.

func (S3Loader) Load

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

Load implements SkillLoader.

type Skill

type Skill struct {
	Name         string
	Description  string
	Instructions string
}

func LoadDirectories

func LoadDirectories(roots []string) ([]Skill, error)

LoadDirectories loads one skill per immediate child directory. Directories are processed in lexical order and duplicate skill names are rejected.

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