skill

package
v0.23.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(e *sdk.Extension)

Register registers the skill extension's tools, command, message hook, and schedules OnInit work via OnInitAppend.

Types

type Skill

type Skill struct {
	Name        string   `yaml:"name"`
	Description string   `yaml:"description"`
	Triggers    []string `yaml:"triggers"`
	Path        string   `yaml:"-"`

	Findings []unicodeaudit.Finding // suspicious Unicode in the skill body; nil if clean
	// contains filtered or unexported fields
}

Skill describes a loaded skill file.

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store manages skill files in a directory.

func NewStore

func NewStore(dir string) *Store

NewStore scans dir for .md files with YAML frontmatter and caches metadata.

func (*Store) Dir

func (s *Store) Dir() string

Dir returns the skills directory path.

func (*Store) List

func (s *Store) List() []Skill

List returns all loaded skills.

func (*Store) Load

func (s *Store) Load(name string) (string, error)

Load returns the cached body of a skill by name (no frontmatter).

func (*Store) Match

func (s *Store) Match(text string) []Skill

Match returns skills whose trigger keywords appear in text. Sorted by longest matching trigger first (most specific).

Directories

Path Synopsis
Skill extension binary.
Skill extension binary.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL