skillsdoc

package
v0.47.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const HeadMatterSpec = "YAML front-matter delimited by '---' with required keys: name, version, description, requires.bins[]"

HeadMatterSpec is the exact YAML front-matter schema we expect at the top of each *.SKILL.md file.

The front-matter MUST be the first thing in the file and MUST be delimited by two lines containing only "---".

Required keys:

  • name: string (unique skill name; recommended to match file base name)
  • version: string (semver-like, eg "0.1.0")
  • description: string (one-line summary)
  • requires: bins: [string] (CLI binaries required; for now always includes "ivcap")

Example:

--- name: ivcap-job-create version: 0.1.0 description: Create an IVCAP job from a service. requires:

bins: ["ivcap"]

---

Variables

This section is empty.

Functions

This section is empty.

Types

type HeadMatter

type HeadMatter struct {
	Name        string   `yaml:"name" json:"name"`
	Version     string   `yaml:"version" json:"version"`
	Description string   `yaml:"description" json:"description"`
	Requires    Requires `yaml:"requires" json:"requires"`
}

type Requires

type Requires struct {
	Bins []string `yaml:"bins" json:"bins"`
}

type SkillDoc

type SkillDoc struct {
	HeadMatter

	// Path is a stable, repo-like path, eg "skills/ivcap-job-create.SKILL.md".
	Path string `json:"path" yaml:"path"`

	// SHA256 is the hex digest of the full file content (including front-matter).
	SHA256 string `json:"sha256" yaml:"sha256"`

	// Content is the full SKILL.md content (including front-matter).
	Content string `json:"content,omitempty" yaml:"content,omitempty"`
}

func FindByName

func FindByName(docs []*SkillDoc, name string) *SkillDoc

func LoadAllSkillDocs

func LoadAllSkillDocs(fsys fs.FS) ([]*SkillDoc, error)

func ParseSkillDoc

func ParseSkillDoc(path string, content []byte) (*SkillDoc, error)

Jump to

Keyboard shortcuts

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