skills

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package skills exposes three LLM-callable tools that surface Agent Skills to a chat model through progressive disclosure. It is a thin adapter over the skills module's github.com/Tangerg/scope/skills.Source capability: the base module parses, validates, and serves skill content; this package maps that onto the shared `tool.Tool` contract.

Each disclosure step has one tool and one input shape:

  • list_skills — every skill's name + description
  • load_skill — one skill's full instruction body, by name
  • read_skill_resource — one bundled file under a skill

Scripts bundled with a skill are NOT executed here — the model runs them with its own shell/file tools after reading the instructions.

Index

Constants

View Source
const (
	DefaultMaxOutputBytes = int64(256 * 1024)
)

Exported defaults keep constructor behavior visible and overridable.

Variables

View Source
var ErrNilSource = errors.New("skills: source must not be nil")

Functions

func NewTools

func NewTools(source skillsrc.ResourceSource, config Config) ([]toolcontract.Tool, error)

NewTools returns the listing, loading, and resource-reading tools together because they are only useful as a set: a model that can load a skill but not read the resources its instructions reference will follow a broken pointer.

Types

type Config

type Config struct {
	MaxOutputBytes int64
}

Config bounds how much skill content may enter a model's context. The limit lives here rather than in the repository because the same skill set is reasonable or oversized depending on the model it is fed to.

type LoadSkillRequest

type LoadSkillRequest struct {
	Name string `` /* 136-byte string literal not displayed */
}

LoadSkillRequest names a skill exactly. Loading is by name rather than by a query so a model cannot broaden what it loads, and so the same prompt resolves to the same skill on every run.

type ReadSkillResourceRequest

type ReadSkillResourceRequest struct {
	Name string `` /* 129-byte string literal not displayed */
	Path string `` /* 159-byte string literal not displayed */
}

ReadSkillResourceRequest carries the skill name alongside the resource path, so a read is confined to the skill that referenced it. A path alone would let one skill read another's files.

Jump to

Keyboard shortcuts

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