Documentation
¶
Overview ¶
Package skill implements the skill system: named, reusable instruction packages the agent can invoke on demand. The format follows the agentskills.io open standard — a SKILL.md with YAML frontmatter (name, description, and optional license/compatibility fields) followed by Markdown instructions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// OnInvoke, if set, is called when a skill is invoked (before its instructions
// are returned). Its return string is appended to the tool output — hosts use it
// to reveal + unlock the skill's MCPs (e.g. append a deferred-tools name block
// and add those tools to the session unlock set). Side effects (unlocking) run
// here too.
OnInvoke func(Skill) string
// contains filtered or unexported fields
}
Registry is a name-indexed set of skills.
func LoadDir ¶
LoadDir loads skills from a directory. Each skill is a subdirectory containing SKILL.md (or a bare .md file) with YAML frontmatter following the agentskills.io specification (name, description, and optional license/compatibility fields).
func NewRegistry ¶
NewRegistry builds a registry from skills.
type Skill ¶
type Skill struct {
Name string
Description string
License string
Compatibility string
WhenToUse string // legacy; new skills use Description for when-to-use
Instructions string
// MCPs names MCP servers this skill unlocks when invoked (frontmatter `mcps:`).
// Hosts use this to reveal + unlock those servers' deferred tools on load — see
// Registry.OnInvoke.
MCPs []string
// Dir is the directory that contains this skill's SKILL.md file.
// Empty for skills loaded from sources other than the filesystem.
Dir string
}
Skill is one invokable instruction package. Fields align with the agentskills.io specification:
- Name and Description are required
- License, Compatibility are optional standard fields
- WhenToUse is kept for backwards compatibility (pre-spec skills used it; new skills should fold this into Description instead)