skills

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package skills discovers and parses SKILL.md skill folders in the global and project skills directories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RootAllowed

func RootAllowed(home, resolvedRoot string) bool

func Within

func Within(root *os.Root, base, name string) (string, bool)

os.Root refuses every absolute symlink, even one whose target lies inside it, so Within follows links itself and maps targets inside base back to a root-relative path for the caller to open.

Types

type Layer

type Layer string
const (
	Global  Layer = "global"
	Project Layer = "project"
)

type Reason

type Reason string
const (
	OutsideFolder       Reason = "outside_folder"
	Unreadable          Reason = "unreadable"
	TooLarge            Reason = "too_large"
	BadFrontMatter      Reason = "bad_front_matter"
	BadName             Reason = "bad_name"
	NameMismatch        Reason = "name_mismatch"
	MissingDescription  Reason = "missing_description"
	BuiltinClash        Reason = "builtin_clash"
	OverriddenByProject Reason = "overridden_by_project"
)

type Set

type Set struct {
	Loaded  []Skill
	Skipped []Skipped
}

func Load

func Load(home, projectRoot string, reserved map[string]bool, maxFileBytes int) Set

type Skill

type Skill struct {
	Name           string
	Description    string
	Layer          Layer
	Folder         string
	Body           string
	ModelInvocable bool
}

type Skipped

type Skipped struct {
	Path   string
	Reason Reason
}

Jump to

Keyboard shortcuts

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