skill

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Skill

type Skill interface {
	Name() string
	Description() string
	Instructions() string
	Triggers() []Trigger
	Tools() []tool.Tool
	IsActive(ctx context.Context, context SkillContext) bool
}

type SkillConfig

type SkillConfig struct {
	Enabled  bool              `json:"enabled"`
	Params   map[string]string `json:"params"`
	Priority int               `json:"priority"`
}

type SkillContext

type SkillContext struct {
	CurrentFile   string
	UserMessage   string
	ActiveCommand string
}

type SkillInfo

type SkillInfo struct {
	Name        string      `json:"name"`
	Description string      `json:"description"`
	Triggers    []Trigger   `json:"triggers"`
	Config      SkillConfig `json:"config"`
	Source      SkillSource `json:"source"`
}

type SkillRegistry

type SkillRegistry interface {
	Register(s Skill, source SkillSource) error
	Get(name string) (Skill, bool)
	List() []SkillInfo
	ActiveSkills(ctx context.Context, context SkillContext) []Skill
	BuildSystemPrompt(ctx context.Context, context SkillContext) string
	Enable(name string) error
	Disable(name string) error
	LoadFromPath(path string, source SkillSource) error
}

type SkillSource

type SkillSource string
const (
	SourceBuiltin SkillSource = "builtin"
	SourceUser    SkillSource = "user"
	SourceProject SkillSource = "project"
)

type Trigger

type Trigger struct {
	Type    TriggerType `json:"type"`
	Pattern string      `json:"pattern"`
}

type TriggerType

type TriggerType string
const (
	TriggerFilePattern TriggerType = "file_pattern"
	TriggerCommand     TriggerType = "command"
	TriggerAlways      TriggerType = "always"
)

Jump to

Keyboard shortcuts

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