skill

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatIndex

func FormatIndex(skills []Skill) string

FormatIndex returns a pre-formatted skills index for the system prompt. Returns empty string if there are no skills.

func Load

func Load(s Skill) (string, error)

Load reads the full SKILL.md content for a skill.

func NewTool

func NewTool(skills []Skill) core.Tool

NewTool creates the load_skill tool that lets the agent load skill content on demand.

Types

type Skill

type Skill struct {
	Name        string // directory name (e.g., "go-testing")
	DisplayName string // from first # heading in SKILL.md
	Description string // first paragraph after heading
	Dir         string // absolute path to skill directory
}

Skill represents a loadable knowledge pack.

func Discover

func Discover(cwd string) []Skill

Discover scans skill directories and returns available skills. Project-level skills (.moa/skills/) override global ones (~/.config/moa/skills/) when they share the same name. Results are sorted by name.

Jump to

Keyboard shortcuts

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