Documentation
¶
Overview ¶
Package skills contains the filesystem and validation logic for the folder-shaped Agent Skills format (agentskills.io): SKILL.md frontmatter validation, bundled-file discovery, and safe path handling for downloads.
Index ¶
Constants ¶
const ( // MaxSkillMDBytes is the backend limit for the literal SKILL.md payload. MaxSkillMDBytes = 1 << 20 // 1 MB // MaxFileBytes is the backend per-file limit for bundled resources. MaxFileBytes = 100 << 20 // 100 MB )
Variables ¶
This section is empty.
Functions ¶
func ReadSkillMD ¶
ReadSkillMD reads the literal SKILL.md bytes from a skill folder root, returning friendly errors for the common failure modes.
func SafeJoin ¶
SafeJoin joins a server-supplied manifest path onto a local destination directory, refusing absolute paths, backslashes, and any path that would escape dir.
func ValidateName ¶
ValidateName checks the SKILL.md frontmatter `name` field against the backend rule and returns a friendly error when it does not conform.
Types ¶
type File ¶
type File struct {
// Path is the manifest path: relative to the skill folder root, with
// forward slashes.
Path string
// AbsPath is the on-disk location of the file.
AbsPath string
// Size is the file size in bytes.
Size int64
}
File is one bundled asset discovered inside a skill folder.
type Frontmatter ¶
Frontmatter holds the SKILL.md fields the CLI surfaces. Parsing never rewrites the markdown — the literal bytes are uploaded as-is.
func ParseFrontmatter ¶
func ParseFrontmatter(md []byte) (*Frontmatter, error)
ParseFrontmatter extracts the YAML frontmatter block from raw SKILL.md bytes. The file must start with a `---` line closed by another `---` line.