Purpose
Theskills package turns SKILL.md files into discoverable prompt assets.
Default roots
The package exports:DefaultGlobalRootPath = "~/.agents/skills"DefaultLocalRootPath = "./.agents/skills"
Skill
Name and Description come from frontmatter in the skill file.
Discovery and loading
DiscoverSkillFiles
Scans each configured root and collects SKILL.md files one directory level below that root.
Behavior worth knowing:
~/...roots are expanded throughos.UserHomeDir()- missing roots are ignored
- nested skill files deeper than one level are not discovered
GetSkillData
Reads one SKILL.md file, parses its frontmatter, and returns Skill metadata.
LoadAllSkills
Combines discovery plus metadata loading across all provided roots.
LoadSkillTool
NewLoadSkillTool(skills) creates a tool implementation for the loop package.
Its behavior is simple:
- argument:
name - looks for an exact skill-name match in the loaded slice
- returns the full file body
- returns an error string if the name is unknown or the file cannot be read