skill

package
v0.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package skill provides a meta-tool for LLM-invocable skills with progressive disclosure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inputs

type Inputs struct {
	Name string `json:"name" jsonschema:"required,description=Skill name to invoke"`
}

Inputs defines the parameters for the Skill tool.

type Tool

type Tool struct {
	tool.Base
	// contains filtered or unexported fields
}

Tool is a meta-tool that lets the LLM invoke user-defined skills by name. Skill descriptions are embedded in the tool's description for progressive disclosure. The full skill body is returned only when the LLM invokes a specific skill.

func New

func New(skills config.Collection[config.Skill]) *Tool

New creates a Skill tool with a dynamic description built from all skill descriptions.

func (*Tool) Execute

func (t *Tool) Execute(_ context.Context, args map[string]any) (string, error)

Execute looks up a skill by name and returns the full instructions.

func (*Tool) Name

func (t *Tool) Name() string

Name returns the tool's identifier.

func (*Tool) Sandboxable

func (t *Tool) Sandboxable() bool

Sandboxable returns false as this tool has no filesystem operations.

func (*Tool) Schema

func (t *Tool) Schema() tool.Schema

Schema returns the provider-agnostic tool definition.

Jump to

Keyboard shortcuts

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