skill

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package skill renders and installs the agent skill embedded in the binary (skills/ytrack), stamped with the binary's version so an installed skill always describes the ytrack that installed it.

Index

Constants

View Source
const EntryFile = "SKILL.md"

EntryFile is the skill's entry point inside its directory.

View Source
const Name = "ytrack"

Name is the skill's name: its directory and its frontmatter name.

Variables

This section is empty.

Functions

func Files

func Files() fs.FS

Files returns the embedded skill directory: SKILL.md and references/.

func Install

func Install(root, version string) (string, error)

Install writes the skill, stamped with version, to <root>/ytrack and returns that directory. root is created when missing. An existing <root>/ytrack is replaced only when its SKILL.md has "name: ytrack"; anything else there is refused with a *ForeignError and left untouched. A symlinked <root>/ytrack (as `npx skills add` makes) is followed and its target updated.

The new copy is written to a temporary sibling directory and renamed into place, so a failed install leaves the earlier skill as it was.

func Render

func Render(version string) ([]byte, error)

Render returns SKILL.md with metadata.version set to version.

Types

type ForeignError

type ForeignError struct{ Dir string }

ForeignError reports a skill directory that Install will not replace because it does not hold the ytrack skill.

func (*ForeignError) Error

func (e *ForeignError) Error() string

type Meta

type Meta struct {
	Name        string            `yaml:"name"`
	Description string            `yaml:"description"`
	Metadata    map[string]string `yaml:"metadata"`
}

Meta is the SKILL.md frontmatter.

func ParseMeta

func ParseMeta(b []byte) (Meta, error)

ParseMeta reads the frontmatter of a SKILL.md.

Jump to

Keyboard shortcuts

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