skills

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package skills provides the embedded skill pack for LLM-driven agents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(name string) (string, bool)

Get returns the markdown content for the named skill. The name should not include the .md extension. Returns the content and true if found, or empty string and false otherwise.

func Names

func Names() []string

Names returns the sorted list of skill names.

func ParseFrontmatter

func ParseFrontmatter(md string) map[string]string

ParseFrontmatter extracts YAML frontmatter fields from markdown content. It returns key-value pairs from the --- delimited header.

List-valued fields (applies_to, covers, examples_tags) are stored under their key as the raw post-colon string — callers that need a parsed slice should use parseList or go through Metadata via parseMetadata.

Types

type Metadata

type Metadata struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Type        string   `json:"type"`
	AppliesTo   []string `json:"applies_to"`

	// Kind classifies the skill: "operator" | "tool" | "type" | "design".
	Kind string `json:"kind,omitempty"`
	// Category is the operator family: AGG | ATTR | FILTER | GROUP | WIN | FEAT | TEST | REG | OVERLAY | SYNTH; empty when not operator-scoped.
	Category string `json:"category,omitempty"`
	// Operator is the full operator constant (e.g. TEST_WELCH); empty when not operator-scoped.
	Operator string `json:"operator,omitempty"`
	// Covers lists operators/tools/types covered by a design skill.
	Covers []string `json:"covers,omitempty"`
	// ExamplesTags lists the runnable-example tags referenced by a "## See" section in an atomic skill.
	ExamplesTags []string `json:"examples_tags,omitempty"`
}

Metadata describes a bundled skill.

func List

func List() []Metadata

List walks the embedded content for *.md files, parses their YAML frontmatter, and returns the resulting Metadata slice sorted by Name.

Frontmatter-less files are skipped silently. A frontmatter-less file in skills/ would be a code-review smell, but the loader is the wrong place to crash on it — coverage gates (TestSkillsCoverAllComponents and friends) and reviewers will catch a missing skill. Non-`.md` entries are ignored.

Jump to

Keyboard shortcuts

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