skills

package
v0.54.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivationMessage

func ActivationMessage(skill Skill, args []string) (string, error)

func Catalog

func Catalog(all []Skill, cfg Config) string

func ConfigPath

func ConfigPath() (string, error)

func EnsureBundled

func EnsureBundled() (string, error)

EnsureBundled extracts embedded skill files into <home>/.keen/skills/bundled, overwriting on each call so the bundled set always matches the binary version. Returns the absolute bundled root path and any extraction error. Returns ("", nil) when the home directory cannot be resolved — bundled skills simply won't appear in that case.

func SaveConfig

func SaveConfig(cfg Config) error

Types

type Config

type Config struct {
	IsEnabled map[string]bool `json:"is_enabled"`
}

func LoadConfig

func LoadConfig() Config

func (Config) Enabled

func (c Config) Enabled(name string) bool

func (*Config) RemoveStatus

func (c *Config) RemoveStatus(name string)

func (*Config) SetStatus

func (c *Config) SetStatus(name string, status Status)

type Discovery

type Discovery struct {
	Skills   []Skill
	Warnings []string
}

func Discover

func Discover(workingDir, bundledDir string) Discovery

func LoadMetadata

func LoadMetadata(discovery Discovery) Discovery

type Skill

type Skill struct {
	Name        string
	Description string
	Location    string
}

func Find

func Find(skills []Skill, name string) (Skill, bool)

func ParseSkillMetadata

func ParseSkillMetadata(path string, data []byte) (Skill, error)

type Status

type Status bool
const (
	StatusDisabled Status = false
	StatusEnabled  Status = true
)

Jump to

Keyboard shortcuts

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