agentskill

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package agentskill loads know-how in the Agent Skills format: a folder with a SKILL.md (YAML frontmatter with a name and a description, then the instructions in Markdown) and any files it points to. A skill is trusted like a prompt, since its owner installed it; it grants no permissions, and scripts in it are never run, only read.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Skill

type Skill struct {
	Name        string
	Description string
	Body        string
	// Files are all of it by slash-separated path, SKILL.md included.
	Files map[string][]byte
}

func FromDir

func FromDir(dir string) (Skill, error)

FromDir reads a skill's folder, which must be named like the skill.

func Parse

func Parse(files map[string][]byte) (Skill, error)

Parse makes a skill of its files; fs.ErrNotExist if there's no SKILL.md.

func (Skill) Others

func (s Skill) Others() []string

Others are its files besides SKILL.md, sorted.

func (Skill) Read

func (s Skill) Read(file string) (string, error)

Read is one of its files besides SKILL.md. One that isn't text (an image, a PDF, a font) is only described: its bytes would mean nothing read as words.

type Use

type Use struct {
	Skills []Skill
}

Use reads a skill, or one of its files, as material for an activity: its query is a skill's name, or name/file.

func (Use) Describe

func (Use) Describe() string

func (Use) Name

func (Use) Name() string

func (Use) Next

func (u Use) Next() []ability.Ability

Next lets it read one of the skill's files after its instructions.

func (Use) Prepare

func (u Use) Prepare(_ context.Context, a ability.Act) (ability.Material, error)

func (Use) Risk

func (Use) Risk() ability.Risk

Jump to

Keyboard shortcuts

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