Documentation
¶
Index ¶
- func DiscoveryRoots(root string) []string
- func FormatForPrompt(skills []Skill) string
- func ParseSlashCommand(text 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 LoadBundledAt(fsys fs.FS, root, locationRoot string) ([]Skill, error)
- func LoadDir(dir string) []Skill
- func LoadFile(path string) (Skill, error)
- func Merge(bundled, discovered []Skill) []Skill
- func MustDiscover(root string) []Skill
- func MustDiscoverPersonal() []Skill
- func Rediscover(root string) ([]Skill, error)
- func RediscoverPersonal() ([]Skill, error)
- func (s *Skill) AbsoluteDir(workDir string) string
- func (s *Skill) ApplySubstitutions(content, args, skillDir, projectDir string) string
- func (s *Skill) GetContent(workingDir string) (string, error)
- func (s *Skill) InvocationHint() string
- func (s *Skill) Portable() bool
- func (s *Skill) Qualified() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoveryRoots ¶ added in v0.15.0
DiscoveryRoots returns every directory that can contribute skills to a workspace. Callers use it to grant narrow resource access before a root is created, so skills generated after a session starts remain usable.
func FormatForPrompt ¶
func ParseSlashCommand ¶ added in v0.12.9
ParseSlashCommand returns the name of a leading Wingman slash command.
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 or Codex $skill mention, deduplicated in order of first appearance. A mention only counts when its sigil 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 the invoked skill into the <skill-instructions> block attached (hidden) to the message invoking it.
type Skill ¶
type Skill struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
License string `yaml:"license"`
Compatibility string `yaml:"compatibility"`
Metadata map[string]string `yaml:"metadata"`
AllowedTools []string `yaml:"allowed-tools"`
Arguments []string `yaml:"-"`
ArgumentHint string `yaml:"-"`
Location string `yaml:"-"`
Content string `yaml:"-"`
Bundled bool `yaml:"-"`
Plugin string `yaml:"-"`
// contains filtered or unexported fields
}
func DiscoverPersonal ¶ added in v0.6.2
func FindSkill ¶ added in v0.6.2
FindSkill resolves either a bare skill name or a "<plugin>:<skill>" name. A qualified query never falls back to a bare match, so it always reaches the plugin's own skill even when another source shadows the bare name.
func LoadBundledAt ¶ added in v0.12.4
LoadBundledAt loads bundled skill metadata and assigns each skill the corresponding directory beneath locationRoot. The caller owns copying the complete resource tree to that location.
func LoadDir ¶ added in v0.12.9
LoadDir loads skills beneath dir. Directories without SKILL.md are grouping directories and are traversed recursively; a skill directory is a leaf so supporting resources below it cannot be mistaken for additional skills. Symlinked directories are followed once, with their resolved paths used to prevent cycles.
func Merge ¶ added in v0.6.2
Merge layers discovered skills over bundled ones by name. A shadowed plugin skill is kept, but moved behind the winner so only its qualified name resolves; anything else that loses its name is dropped.
func MustDiscover ¶ added in v0.6.2
func MustDiscoverPersonal ¶ added in v0.6.2
func MustDiscoverPersonal() []Skill
func Rediscover ¶ added in v0.15.0
Rediscover repeats project discovery without reprinting diagnostics already reported at startup. It is intended for runtime catalog reconciliation.
func RediscoverPersonal ¶ added in v0.15.0
RediscoverPersonal repeats personal discovery without reprinting diagnostics already reported at startup.
func (*Skill) AbsoluteDir ¶ added in v0.6.2
func (*Skill) ApplySubstitutions ¶ added in v0.12.9
ApplySubstitutions renders Wingman's body-only skill extensions. The neutral directory variables have Claude-compatible aliases; argument behavior follows Claude Code, including zero-based indexed arguments and fallback appending.
func (*Skill) GetContent ¶ added in v0.6.2
func (*Skill) InvocationHint ¶ added in v0.12.9
InvocationHint returns the explicit Claude-compatible argument hint or a neutral hint derived from the declared positional argument names.
func (*Skill) Portable ¶ added in v0.12.9
Portable reports whether the skill frontmatter uses only Agent Skills fields.