Documentation
¶
Index ¶
- func BuildCatalogXML(skills []SkillRecord) string
- func BuildSkillContentXML(record SkillRecord) string
- func ListResources(baseDir string) ([]string, error)
- func New() engine.Plugin
- type Plugin
- func (p *Plugin) Capabilities() []engine.Capability
- func (p *Plugin) ConfigSchema() []byte
- func (p *Plugin) Dependencies() []string
- func (p *Plugin) Emissions() []string
- func (p *Plugin) ID() string
- func (p *Plugin) Init(ctx engine.PluginContext) error
- func (p *Plugin) Name() string
- func (p *Plugin) Ready() error
- func (p *Plugin) Requires() []engine.Requirement
- func (p *Plugin) Shutdown(_ context.Context) error
- func (p *Plugin) Subscriptions() []engine.EventSubscription
- func (p *Plugin) Version() string
- type SkillRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCatalogXML ¶
func BuildCatalogXML(skills []SkillRecord) string
BuildCatalogXML generates the <available_skills> XML block for system prompt injection.
func BuildSkillContentXML ¶
func BuildSkillContentXML(record SkillRecord) string
BuildSkillContentXML generates the <skill_content> XML wrapper with the skill body and a list of available resources.
func ListResources ¶
ListResources lists files in the scripts/, references/, and assets/ subdirectories of a skill's base directory.
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin manages skill discovery, activation, and resource access.
func (*Plugin) Capabilities ¶
func (p *Plugin) Capabilities() []engine.Capability
func (*Plugin) ConfigSchema ¶
ConfigSchema implements engine.ConfigSchemaProvider.
func (*Plugin) Dependencies ¶
func (*Plugin) Requires ¶
func (p *Plugin) Requires() []engine.Requirement
func (*Plugin) Subscriptions ¶
func (p *Plugin) Subscriptions() []engine.EventSubscription
type SkillRecord ¶
type SkillRecord struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Location string `yaml:"-"`
BaseDir string `yaml:"-"`
License string `yaml:"license"`
Compatibility string `yaml:"compatibility"`
Metadata map[string]string `yaml:"metadata"`
AllowedTools []string `yaml:"allowed_tools"`
OutputSchema map[string]any `yaml:"output_schema"` // inline JSON Schema for structured output
OutputSchemaFile string `yaml:"output_schema_file"` // path to .json schema file (relative to skill dir)
Class string `yaml:"class"` // Semantic class for progressive discovery.
Subclass string `yaml:"subclass"` // Optional grouping within class.
Tags []string `yaml:"tags"` // Cross-cutting metadata for filtering.
Runtime string `yaml:"runtime"` // "yaegi" (default) or "wasm" — selects the codeexec runtime for skill helpers.
Body string `yaml:"-"`
Scope string `yaml:"-"` // "project", "user", "builtin", "config"
Trusted bool `yaml:"-"`
}
SkillRecord holds all parsed data from a SKILL.md file.
func ParseSkillFile ¶
func ParseSkillFile(path string) (*SkillRecord, error)
ParseSkillFile reads and parses a SKILL.md file, extracting YAML frontmatter and the markdown body.
func ScanForSkills ¶
func ScanForSkills(paths []string, logger *slog.Logger) []SkillRecord
ScanForSkills scans the given paths for directories containing SKILL.md files.