skills

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFromDir

func LoadFromDir(scope Scope, skillDir string) (Skill, bool, []Diagnostic)

Types

type Arg

type Arg struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Required    bool   `json:"required"`
	Description string `json:"description"`
	Default     string `json:"default"`
}

type AuthorResult

type AuthorResult struct {
	Name         string
	Scope        Scope
	Dir          string
	ManifestPath string
	SkillPath    string
	Created      bool
	Updated      bool
}

type Catalog

type Catalog struct {
	Skills      []Skill
	Diagnostics []Diagnostic
	Overrides   []Override
	LoadedAt    time.Time
}

type ClearResult

type ClearResult struct {
	Name      string
	Scope     Scope
	Dir       string
	Removed   bool
	NotFound  bool
	WasActive bool
}

type Diagnostic

type Diagnostic struct {
	Scope   Scope
	Path    string
	Skill   string
	Level   string
	Message string
}

type Entry

type Entry struct {
	Slash string `json:"slash"`
}

type Manager

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

func NewManager

func NewManager(workspace string) *Manager

func NewManagerWithDirs

func NewManagerWithDirs(workspace, builtinDir, userDir, projectDir string) *Manager

func (*Manager) Author

func (m *Manager) Author(name string, scope Scope, brief string) (AuthorResult, error)

func (*Manager) Clear

func (m *Manager) Clear(name string) (ClearResult, error)

func (*Manager) Find

func (m *Manager) Find(name string) (Skill, bool)

func (*Manager) List

func (m *Manager) List() ([]Skill, []Diagnostic)

func (*Manager) Reload

func (m *Manager) Reload() Catalog

func (*Manager) Snapshot

func (m *Manager) Snapshot() Catalog

func (*Manager) Workspace

func (m *Manager) Workspace() string

type Override

type Override struct {
	Name       string
	Winner     Scope
	Loser      Scope
	WinnerPath string
	LoserPath  string
}

type PromptRef

type PromptRef struct {
	ID   string `json:"id"`
	Path string `json:"path"`
}

type ResourceRef

type ResourceRef struct {
	ID       string `json:"id"`
	URI      string `json:"uri"`
	Optional bool   `json:"optional"`
}

type Scope

type Scope string
const (
	ScopeBuiltin Scope = "builtin"
	ScopeUser    Scope = "user"
	ScopeProject Scope = "project"
)

type Skill

type Skill struct {
	Name         string
	Version      string
	Title        string
	Description  string
	WhenToUse    string
	Scope        Scope
	SourceDir    string
	Instruction  string
	Entry        Entry
	Prompts      []PromptRef
	Resources    []ResourceRef
	ToolPolicy   ToolPolicy
	Args         []Arg
	Aliases      []string
	DiscoveredAt time.Time
}

type ToolPolicy

type ToolPolicy struct {
	Policy ToolPolicyMode `json:"policy"`
	Items  []string       `json:"items"`
}

type ToolPolicyMode

type ToolPolicyMode string
const (
	ToolPolicyInherit   ToolPolicyMode = "inherit"
	ToolPolicyAllowlist ToolPolicyMode = "allowlist"
	ToolPolicyDenylist  ToolPolicyMode = "denylist"
)

Directories

Path Synopsis
skill-creator
tools command

Jump to

Keyboard shortcuts

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