skill

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatAvailableSkills

func FormatAvailableSkills(skills []Definition) string

Types

type Definition

type Definition struct {
	Name                    string   `json:"name"`
	Description             string   `json:"description"`
	UserInvocable           bool     `json:"user_invocable"`
	Source                  Source   `json:"source"`
	FilePath                string   `json:"file_path"`
	RuntimePath             string   `json:"runtime_path,omitempty"`
	RecommendedTools        []string `json:"recommended_tools,omitempty"`
	RecommendedProjectFiles []string `json:"recommended_project_files,omitempty"`
	WakePhases              []string `json:"wake_phases,omitempty"`
	Content                 string   `json:"content,omitempty"`
}

type Diagnostic

type Diagnostic struct {
	Path    string `json:"path,omitempty"`
	Message string `json:"message"`
}

type Frontmatter

type Frontmatter struct {
	Name                    string
	Description             string
	UserInvocable           *bool
	RecommendedTools        []string
	RecommendedProjectFiles []string
	WakePhases              []string
}

func ParseFrontmatter

func ParseFrontmatter(raw string) (Frontmatter, string, error)

type LoadOptions

type LoadOptions struct {
	Sources []SourceDir
}

type Snapshot

type Snapshot struct {
	Version     int64        `json:"version"`
	Skills      []Definition `json:"skills"`
	Diagnostics []Diagnostic `json:"diagnostics,omitempty"`
}

func Load

func Load(opts LoadOptions) (Snapshot, error)

func MirrorToWorkspace

func MirrorToWorkspace(workspaceDir string, snapshot Snapshot) (Snapshot, error)

type Source

type Source string
const (
	SourceWorkspace Source = "workspace"
	SourceUser      Source = "user"
	SourceBundled   Source = "bundled"
)

type SourceDir

type SourceDir struct {
	Source Source
	Dir    string
}

Jump to

Keyboard shortcuts

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