skills

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFrontmatter

func ExtractFrontmatter(data []byte) ([]byte, []byte, error)

func LoadSkillsFromDir

func LoadSkillsFromDir(dir string, source skill.SkillSource) ([]skill.Skill, error)

func MatchPattern

func MatchPattern(pattern, path string) bool

func ParseSkill

func ParseSkill(data []byte, source skill.SkillSource) (skill.Skill, error)

func ParseSkillFile

func ParseSkillFile(path string, source skill.SkillSource) (skill.Skill, error)

Types

type PromptBuilder

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

func NewPromptBuilder

func NewPromptBuilder(registry *Registry) *PromptBuilder

func (*PromptBuilder) BuildActiveSkillList

func (b *PromptBuilder) BuildActiveSkillList(ctx context.Context, context skill.SkillContext) []string

func (*PromptBuilder) BuildSkillList

func (b *PromptBuilder) BuildSkillList() []string

func (*PromptBuilder) BuildSystemPrompt

func (b *PromptBuilder) BuildSystemPrompt(ctx context.Context, context skill.SkillContext) string

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) ActiveSkills

func (r *Registry) ActiveSkills(ctx context.Context, context skill.SkillContext) []skill.Skill

func (*Registry) BuildSystemPrompt

func (r *Registry) BuildSystemPrompt(ctx context.Context, context skill.SkillContext) string

func (*Registry) Disable

func (r *Registry) Disable(name string) error

func (*Registry) Enable

func (r *Registry) Enable(name string) error

func (*Registry) Get

func (r *Registry) Get(name string) (skill.Skill, bool)

func (*Registry) IsEnabled

func (r *Registry) IsEnabled(name string) bool

func (*Registry) List

func (r *Registry) List() []skill.SkillInfo

func (*Registry) LoadFromPath

func (r *Registry) LoadFromPath(path string, source skill.SkillSource) error

func (*Registry) Register

func (r *Registry) Register(s skill.Skill, source skill.SkillSource) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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