Documentation
¶
Index ¶
- Constants
- func FormatSkillsAsXML(skills []Skill) string
- type Frontmatter
- type FrontmatterProvider
- type Resources
- func (r Resources) GetAsset(path string) ([]byte, bool)
- func (r Resources) GetReference(path string) (string, bool)
- func (r Resources) GetScript(path string) (string, bool)
- func (r Resources) ListAssets() []string
- func (r Resources) ListReferences() []string
- func (r Resources) ListScripts() []string
- type ResourcesProvider
- type Skill
- type Toolset
Constants ¶
const ( ToolListSkillsName = "list_skills" ToolLoadSkillName = "load_skill" ToolLoadSkillResourceName = "load_skill_resource" ToolRunSkillScriptName = "run_skill_script" )
const DefaultSystemInstruction = `` /* 990-byte string literal not displayed */
DefaultSystemInstruction is the instruction injected when skills are enabled.
Variables ¶
This section is empty.
Functions ¶
func FormatSkillsAsXML ¶
FormatSkillsAsXML formats skills metadata as an XML block.
Types ¶
type Frontmatter ¶
type Frontmatter struct {
Name string
Description string
License string
Compatibility string
AllowedTools string
Metadata map[string]string
}
Frontmatter describes metadata in SKILL.md.
func ReadSkillFrontmatter ¶
func ReadSkillFrontmatter(dir string) (Frontmatter, error)
ReadSkillFrontmatter reads and validates frontmatter from one local skill directory.
func (Frontmatter) Validate ¶
func (f Frontmatter) Validate() error
Validate validates skill frontmatter.
type FrontmatterProvider ¶
type FrontmatterProvider interface {
Frontmatter() Frontmatter
}
FrontmatterProvider provides skill frontmatter data.
type Resources ¶
type Resources struct {
References map[string]string
Assets map[string][]byte
Scripts map[string]string
}
Resources keeps skill files by relative path.
func (Resources) ListAssets ¶
func (Resources) ListReferences ¶
func (Resources) ListScripts ¶
type ResourcesProvider ¶
type ResourcesProvider interface {
Resources() Resources
}
ResourcesProvider provides skill resources data.
type Skill ¶
Skill is the minimal skill contract.
func NewFromDir ¶
NewFromDir loads all skills discovered under a local directory.
type Toolset ¶
type Toolset struct {
// contains filtered or unexported fields
}
Toolset provides tools and instructions for loaded skills.
func NewToolset ¶
NewToolset creates a new skill toolset.
func (*Toolset) ComposeTools ¶
ComposeTools merges base tools with skill tools and applies allowed-tools filtering.
func (*Toolset) Instruction ¶
Instruction returns the instruction block for skills.