skills

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadWorkspaceMDs

func LoadWorkspaceMDs(workspace string) map[string]string

LoadWorkspaceMDs reads all *.md files directly in the workspace directory.

Types

type Manager

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

Manager provides hot-reload and enable/disable toggles for skills.

func NewManager

func NewManager(logger *zap.SugaredLogger, workspace, statePath string) (*Manager, error)

NewManager creates a Manager, loads skills from workspace, and applies persisted enable/disable state.

func (*Manager) Count

func (m *Manager) Count() int

Count returns the total number of loaded skills.

func (*Manager) EnabledSkills

func (m *Manager) EnabledSkills() []Skill

EnabledSkills returns only skills that are currently enabled.

func (*Manager) Reload

func (m *Manager) Reload() error

Reload re-reads skills from disk and applies persisted state.

func (*Manager) SetEnabled

func (m *Manager) SetEnabled(name string, enabled bool) bool

SetEnabled enables or disables a skill by name and persists the state.

func (*Manager) Skills

func (m *Manager) Skills() []Skill

Skills returns a copy of the current skill list.

func (*Manager) Watch

func (m *Manager) Watch(ctx context.Context, debounce time.Duration) error

Watch watches the workspace/skills/ directory for changes and hot-reloads. Blocks until ctx is cancelled.

type Skill

type Skill struct {
	Name        string
	Description string
	Content     string // full SKILL.md text (after frontmatter)
	Path        string // directory of the SKILL.md
	Origin      string // "local", "marketplace", or custom origin string
	Enabled     bool   // whether the skill is active (default true)
	Verified    bool   // true if installed via CrawHub; false for manual drop-ins (REQ-102)
}

Skill holds a parsed SKILL.md.

func Load

func Load(workspace string) ([]Skill, error)

Load discovers all SKILL.md files under the given workspace directory.

Directories

Path Synopsis
Package builtin provides embedded SKILL.md files for built-in skills.
Package builtin provides embedded SKILL.md files for built-in skills.

Jump to

Keyboard shortcuts

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