skill

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 15 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 implements the parts of the Agent Skills specification (https://agentskills.io/specification) that Skillcrew relies on.

Index

Constants

View Source
const FileName = "SKILL.md"

FileName is the entry point of every skill directory.

View Source
const (

	// MaxDescriptionLength is the specification limit on descriptions, in characters.
	MaxDescriptionLength = 1024
)
View Source
const Placeholder = "TODO: write the instructions the agent follows when it uses this skill."

Placeholder is the line "skillcrew skill new" writes where the instructions of a new skill go.

Variables

This section is empty.

Functions

func CopyAs

func CopyAs(src, dst string) error

CopyAs copies the skill in src to dst and names it after dst's base name: the SKILL.md name is rewritten if needed, then the copy is validated.

func HashDir

func HashDir(fsys fs.FS, root string) (string, error)

HashDir returns a content hash of the files under root. It covers relative paths, contents and the executable bit, so it does not depend on where the directory lives. Symbolic links are hashed by target, never followed.

func Ignored

func Ignored(name string) bool

Ignored reports whether a file is operating system metadata (e.g. the Finder's .DS_Store), which never counts as skill content.

func RenameFrontmatter

func RenameFrontmatter(content []byte, name string) ([]byte, error)

RenameFrontmatter rewrites the name field of a SKILL.md file, leaving the rest untouched.

func Validate

func Validate(fsys fs.FS, dir string) []error

Validate checks the skill stored in dir and returns every problem found.

func ValidateName

func ValidateName(name string) error

ValidateName checks a skill name against the specification.

Types

type Frontmatter

type Frontmatter struct {
	Name        string `yaml:"name"`
	Description string `yaml:"description"`
}

Frontmatter holds the SKILL.md metadata Skillcrew cares about.

func ParseFrontmatter

func ParseFrontmatter(content []byte) (Frontmatter, error)

ParseFrontmatter extracts the YAML frontmatter of a SKILL.md file.

Jump to

Keyboard shortcuts

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