skill

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package skill implements the offline Agent Skill workflow.

Index

Constants

View Source
const (
	SkillVersion = "1"
)

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context, options Options, bundle Bundle) (int, error)

Execute runs exactly one skill action and returns its process status.

Types

type Bundle

type Bundle struct {
	FetchVersion string
	Files        []File
}

Bundle is the embedded, read-only skill payload.

func NewBundle

func NewBundle(fetchVersion string, files []File) (Bundle, error)

NewBundle validates and copies embedded files. It also validates the evaluation fixture so a broken skill cannot be built into a release.

type File

type File struct {
	Path string
	Data []byte
}

File is one file in the portable skill bundle. Path uses forward slashes.

type Options

type Options struct {
	Print          bool
	InstallAgent   string
	UninstallAgent string
	Scope          string
	Force          bool
	DryRun         bool

	HomeDir     string
	ProjectDir  string
	Stdin       io.Reader
	Stdout      io.Writer
	Stderr      io.Writer
	Interactive bool
}

Options controls one skill action. Writers and paths are injectable to keep the filesystem workflow deterministic in tests.

Jump to

Keyboard shortcuts

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