Documentation
¶
Overview ¶
Package skill reads Agent Skills folders: a SKILL.md whose frontmatter names the skill and says when to use it, and the files it uses. A persistent agent's skills are such folders, the built-in ones from the binary and the person's own from a folder or a zip on their computer. Every folder is held to the same bounds before anything reads it: regular files and folders only, no link, no name that climbs out, at most MaxFiles files and MaxBytes bytes.
Index ¶
Constants ¶
const ( MaxFiles = 500 MaxBytes = 32 << 20 MaxNameBytes = 64 MaxDescription = 1024 )
The bounds of a skill folder, and of the format's name and description.
const File = "SKILL.md"
File is the skill's instruction file at its folder's root.
Variables ¶
This section is empty.
Functions ¶
func CopyTo ¶
CopyTo copies the skill folder fsys into dst, which must not exist: its files 0644, or 0755 when the source gives an executable bit, its folders 0755. fsys is held to the bounds first.
func DescriptionValid ¶
DescriptionValid says d is a skill's description: text a System Prompt quotes, so no control or formatting character.
Types ¶
type Meta ¶
Meta is what a SKILL.md's frontmatter says of its skill.
func Parse ¶
Parse reads a SKILL.md's frontmatter: a YAML block between two lines of "---" at its start, with a name and a description. Other fields the format or a harness defines are left as they are.
func Stage ¶
Stage takes the skill at src, a folder or a .zip on this computer, into a new folder under work, held to the bounds, and returns that folder and the skill's meta. A folder is read without following a link anywhere in it; a zip's entries are taken as files and folders only, beneath its root or its one top folder. The skill's folder is named by its SKILL.md, and a folder or top folder of another name is refused.