Documentation
¶
Index ¶
- func ExpandCommand(text string, store *Store) string
- func FormatForPrompt(skills []Skill) string
- func FormatInvocation(skill Skill, args string) string
- func LoadAll(cliPaths []string) (*Store, []Diagnostic)
- func LoadEmbedded() ([]Skill, []Diagnostic)
- func LoadEmbeddedStore() (*Store, []Diagnostic)
- func LoadFromDir(dirPath string, source SkillSource) ([]Skill, []Diagnostic)
- func LoadFromFile(filePath string) (Skill, []Diagnostic, bool)
- func ReadBody(name string) string
- func ReadFile(embedPath string) string
- func SplitFrontmatter(raw string) (map[string]string, string)
- type Diagnostic
- type Frontmatter
- type Skill
- type SkillSource
- type Store
- func (s *Store) AgentTypes() []Skill
- func (s *Store) ByName(name string) (Skill, bool)
- func (s *Store) FormatInvocation(skill Skill, args string) string
- func (s *Store) GlobVirtual(pattern string) ([]string, bool)
- func (s *Store) ReadBody(name string) string
- func (s *Store) ReadVirtual(location string) (string, bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandCommand ¶
func FormatForPrompt ¶
func FormatInvocation ¶
FormatInvocation formats a skill invocation (package-level, embedded-only).
func LoadAll ¶
func LoadAll(cliPaths []string) (*Store, []Diagnostic)
LoadAll loads skills from all sources with override support. Priority (later overrides earlier): embedded < .aiscan/skills/ < .agent/skills/ < CLI paths.
func LoadEmbedded ¶
func LoadEmbedded() ([]Skill, []Diagnostic)
func LoadEmbeddedStore ¶
func LoadEmbeddedStore() (*Store, []Diagnostic)
func LoadFromDir ¶
func LoadFromDir(dirPath string, source SkillSource) ([]Skill, []Diagnostic)
LoadFromDir loads skills from a local directory. Each subdirectory with a SKILL.md is a skill.
func LoadFromFile ¶
func LoadFromFile(filePath string) (Skill, []Diagnostic, bool)
LoadFromFile loads a single skill from a markdown file path.
func ReadBody ¶
ReadBody reads a skill's markdown body from embeddedFS only (package-level convenience).
Types ¶
type Diagnostic ¶
type Frontmatter ¶
type Frontmatter struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Internal bool `yaml:"internal"`
Agent bool `yaml:"agent"`
AgentMaxTurns int `yaml:"agent_max_turns"`
AgentModel string `yaml:"agent_model"`
AgentBackground bool `yaml:"agent_background"`
}
func ParseFrontmatter ¶
func ParseFrontmatter(raw string) (Frontmatter, string)
ParseFrontmatter parses YAML frontmatter into a typed struct and returns the body.
type SkillSource ¶
type SkillSource string
const ( SourceEmbedded SkillSource = "embedded" SourceProject SkillSource = "project" // .aiscan/skills/ SourceAgent SkillSource = "agent" // .agent/skills/ SourceCLI SkillSource = "cli" // -s path )
type Store ¶
type Store struct {
Skills []Skill
// contains filtered or unexported fields
}
func (*Store) AgentTypes ¶
func (*Store) FormatInvocation ¶
FormatInvocation formats a skill invocation with its body. It uses the store to resolve local skill bodies.