Documentation
¶
Overview ¶
Package skills loads SKILL.md directories (Agent Skills standard). It never executes scripts/ and only reads references/ and assets/.
Index ¶
Constants ¶
const MaxFileBytes = 256 << 10
MaxFileBytes is the largest file ReadFile returns.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Skill ¶
type Skill struct {
Name, Description, Body string
On []string
Output, Model string
Tier string // godwit-model-tier; only "small" is kept
Builtin bool
Version string // first 16 hex digits of SHA-256 of SKILL.md
FS fs.FS // the skill directory (built-ins)
// contains filtered or unexported fields
}
func Load ¶
Load parses every directory of root as a skill. Directories that fail are returned in failed, keyed by name.
func LoadDir ¶
LoadDir loads the user skills in dir. A missing dir means none; any other error reading it is returned. Per-skill failures go in failed.
func Parse ¶
Parse reads SKILL.md from fsys, the skill directory named name. The warnings are non-fatal (a scripts/ directory, which is never run).
func (Skill) ReadFile ¶
ReadFile returns a file under references/ or assets/ of the skill directory. For user skills every path component must be a real directory or file inside the skill: symlinks are refused, so links cannot reach scripts/ or other skills.
func (Skill) References ¶
References lists the regular files under references/, as paths ReadFile takes. Symlinks are left out (ReadFile refuses them).