Documentation
¶
Overview ¶
Package skill loads and validates Prism Agent Skills from SKILL.md files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EvalCase ¶ added in v0.1.14
type EvalCase struct {
Name string `yaml:"name"`
Prompt string `yaml:"prompt"`
Expected EvalExpected `yaml:"expected"`
}
type EvalExpected ¶ added in v0.1.14
type Skill ¶
type Skill struct {
// Required frontmatter fields per agentskills.io spec.
Name string `yaml:"name"`
Description string `yaml:"description"`
// Optional frontmatter fields Prism honours when present.
Compatibility string `yaml:"compatibility"`
Metadata map[string]string `yaml:"metadata"`
// Body is the Markdown body of SKILL.md after the frontmatter block.
Body string `yaml:"-"`
// Dir is the skill name (subdirectory name). For local installs callers may
// combine this with a base path to locate reference/script files.
// For remote FS the value is the skill name only (no absolute path).
Dir string `yaml:"-"`
}
Skill holds the parsed SKILL.md frontmatter and body for one Agent Skill.
func DiscoverAll ¶
DiscoverAll loads every skill subdirectory under fsys (the skills root FS). Structure and frontmatter validation errors are aggregated.
func LoadDir ¶
LoadDir resolves a skill by name from the given skills FS. It expects <name>/SKILL.md to exist within fsys.
func (*Skill) CollectScriptPath ¶
CollectScriptPath returns the expected path to scripts/collect.sh within the given skills FS root. It does not guarantee the file exists.
func (*Skill) FullText ¶
FullText returns the skill content formatted for prompt injection. It includes a Markdown heading, the description, optional compatibility note, and the full skill body.
func (*Skill) MetadataSummary ¶
MetadataSummary returns a one-line summary for the skills index section ("progressive disclosure metadata phase").
func (*Skill) ReferenceContent ¶
ReferenceContent reads references/REFERENCE.md for the skill if present. fsys must be the skills root FS (the same one passed to LoadDir/LoadMany). Returns an empty string without error when the file does not exist.