skills

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry manages skill files under <root>/<DataDir>/skills/.

func NewRegistry

func NewRegistry(workspaceRoot string) (*Registry, error)

NewRegistry creates a Registry rooted at the given workspace root.

func (*Registry) Create

func (r *Registry) Create(skill *Skill) error

Create writes a new skill to disk.

func (*Registry) Get

func (r *Registry) Get(name string) (*Skill, error)

Get reads a single skill by name.

func (*Registry) List

func (r *Registry) List() ([]Skill, error)

List returns all skills in the registry.

func (*Registry) Search

func (r *Registry) Search(query string) ([]Skill, error)

Search performs a case-insensitive keyword search across name, description, and triggers.

type Skill

type Skill struct {
	Name        string   `yaml:"name"        json:"name"`
	Description string   `yaml:"description" json:"description"`
	Triggers    []string `yaml:"triggers"    json:"triggers,omitempty"`
	Repos       []string `yaml:"repos"       json:"repos,omitempty"`
	Content     string   `yaml:"-"           json:"content"`
}

Skill represents a reusable skill stored as a markdown file with YAML frontmatter.

Jump to

Keyboard shortcuts

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