Documentation
¶
Index ¶
- func FormatForPrompt(skills []Skill) string
- func MaterializeBundled(s *Skill) (string, error)
- func ParseCommand(text string) (string, string, bool)
- type Invocation
- type Skill
- func Discover(root string) ([]Skill, error)
- func DiscoverPersonal() ([]Skill, error)
- func FindSkill(name string, skills []Skill) *Skill
- func LoadBundled(fsys fs.FS, root string) ([]Skill, error)
- func Merge(bundled, discovered []Skill) []Skill
- func MustDiscover(root string) []Skill
- func MustDiscoverPersonal() []Skill
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatForPrompt ¶
func MaterializeBundled ¶ added in v0.6.2
Types ¶
type Invocation ¶ added in v0.11.7
func Invocations ¶ added in v0.11.7
func Invocations(text string, skills []Skill) []Invocation
Invocations returns every skill text invokes: the whole text as a leading "/name args" command, or /name mentions anywhere inside it, deduplicated in order of first appearance. A mention only counts when the slash starts a word, so paths and URLs never match.
func (Invocation) Instructions ¶ added in v0.11.7
func (inv Invocation) Instructions(workDir string) (string, error)
Instructions loads and expands the invoked skill into the <skill-instructions> block that is attached (hidden) to the message invoking it.
type Skill ¶
type Skill struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
WhenToUse string `yaml:"when-to-use"`
Arguments []string `yaml:"arguments"`
Location string `yaml:"-"`
Content string `yaml:"-"`
Raw string `yaml:"-"`
Bundled bool `yaml:"-"`
}
func DiscoverPersonal ¶ added in v0.6.2
func MustDiscover ¶ added in v0.6.2
func MustDiscoverPersonal ¶ added in v0.6.2
func MustDiscoverPersonal() []Skill
func (*Skill) AbsoluteDir ¶ added in v0.6.2
func (*Skill) ApplyArguments ¶ added in v0.6.2
Click to show internal directories.
Click to hide internal directories.