skills

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SkillStatusDraft      = "draft"
	SkillStatusActive     = "active"
	SkillStatusDeprecated = "deprecated"
)
View Source
const PluginID = "tool/skills"

Variables

This section is empty.

Functions

func Create

func Create(name, description, content, targetDir string) error

Create creates a new skill with the given name, description, and content body. The skill is created with status=draft and created-at=now. targetDir must be the writable skills directory (userSkillsDir or workspace/skills).

func Deprecate

func Deprecate(name, targetDir string) error

Deprecate sets the status of an existing skill to "deprecated".

func Install

func Install(ctx context.Context, source, targetDir string) (string, error)

Install fetches a skill from source and installs it into targetDir.

func NormalizeSkillStatus

func NormalizeSkillStatus(status string) string

func Patch

func Patch(name string, updates map[string]string, targetDir string) error

Patch updates frontmatter fields and/or the content body of an existing skill. Supported update keys: "description", "status", "content" (body after frontmatter).

func Remove

func Remove(name, skillDir string) error

Remove deletes an installed skill directory after validating the name.

func SkillsDefinition

func SkillsDefinition() tools.Definition

func ValidateSkillName

func ValidateSkillName(name, parentDirName string) []string

ValidateSkillName checks a skill name against the Agent Skills spec.

Types

type Skill

type Skill struct {
	Name                   string
	Description            string
	Status                 string
	CreatedAt              string
	FilePath               string
	BaseDir                string
	Source                 string
	DisableModelInvocation bool
}

func LoadSkills

func LoadSkills(annaHome, workspace, cwd string, userSkillsDir ...string) []Skill

LoadSkills discovers skills from project, user, workspace, and common directories.

func VisibleSkills

func VisibleSkills(skills []Skill) []Skill

type Tool

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

func NewTool

func NewTool(annaHome, workspace, cwd, userSkillsDir string) *Tool

func (*Tool) Definition

func (t *Tool) Definition() tools.Definition

func (*Tool) Execute

func (t *Tool) Execute(ctx context.Context, args map[string]any) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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