Documentation
¶
Overview ¶
Package skill handles parsing of SKILL.md files, including YAML frontmatter extraction and body separation. It provides the core Skill type used by validation and scoring packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowedTools ¶
type AllowedTools struct {
Value string // normalized space-delimited string
WasList bool // true if the original YAML used a sequence
}
AllowedTools handles the type ambiguity in the allowed-tools field. The spec defines it as a space-delimited string, but many skills use a YAML list instead. This type accepts both.
func (AllowedTools) IsEmpty ¶
func (a AllowedTools) IsEmpty() bool
IsEmpty returns true if no allowed-tools value was specified.
func (*AllowedTools) UnmarshalYAML ¶
func (a *AllowedTools) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements custom unmarshaling for AllowedTools to accept both string and list formats.
type Frontmatter ¶
type Frontmatter struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
License string `yaml:"license"`
Compatibility string `yaml:"compatibility"`
Metadata map[string]string `yaml:"metadata"`
AllowedTools AllowedTools `yaml:"allowed-tools"`
}
Frontmatter represents the parsed YAML frontmatter of a SKILL.md file.
type Skill ¶
type Skill struct {
Dir string
Frontmatter Frontmatter
RawFrontmatter map[string]any
Body string
RawContent string
}
Skill represents a parsed skill package.
func (*Skill) UnrecognizedFields ¶
UnrecognizedFields returns frontmatter field names not in the spec.