skills

package
v0.0.0-...-d6f4529 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SkillFileName = "SKILL.md"

	MaxNameLength        = 64
	MaxDescriptionLength = 1024
)

Variables

This section is empty.

Functions

func BuildPromptSection

func BuildPromptSection(paths []string) string

func DefaultPaths

func DefaultPaths(workingDir string) ([]string, error)

func DiscoverWithStates

func DiscoverWithStates(paths []string) ([]*Skill, []*SkillState)

func ToPromptXML

func ToPromptXML(skills []*Skill) string

Types

type DiscoveryState

type DiscoveryState int
const (
	StateNormal DiscoveryState = iota
	StateError
)

type Skill

type Skill struct {
	Name                   string            `yaml:"name" json:"name"`
	Description            string            `yaml:"description" json:"description"`
	UserInvocable          bool              `yaml:"user-invocable" json:"user_invocable"`
	DisableModelInvocation bool              `yaml:"disable-model-invocation" json:"disable_model_invocation"`
	License                string            `yaml:"license,omitempty" json:"license,omitempty"`
	Compatibility          string            `yaml:"compatibility,omitempty" json:"compatibility,omitempty"`
	Metadata               map[string]string `yaml:"metadata,omitempty" json:"metadata,omitempty"`

	Instructions  string `yaml:"-" json:"instructions"`
	Path          string `yaml:"-" json:"path"`
	SkillFilePath string `yaml:"-" json:"skill_file_path"`
}

func Discover

func Discover(paths []string) []*Skill

func Parse

func Parse(path string) (*Skill, error)

func ParseContent

func ParseContent(content []byte) (*Skill, error)

func (*Skill) Validate

func (s *Skill) Validate() error

type SkillState

type SkillState struct {
	Name  string
	Path  string
	State DiscoveryState
	Err   error
}

Jump to

Keyboard shortcuts

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