Documentation
¶
Overview ¶
Package skills loads explicitly selected local Agent Skills documents. It never runs scripts, resolves references, installs skills or grants tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrConfig = errors.New("skills: invalid configuration") ErrFormat = errors.New("skills: invalid skill document") ErrLimit = errors.New("skills: size or count limit exceeded") ErrRead = errors.New("skills: catalog read failed") ErrNotFound = errors.New("skills: skill not found") ErrRevision = errors.New("skills: reviewed revision does not match") )
Functions ¶
This section is empty.
Types ¶
type Activation ¶
Activation identifies the exact reviewed snapshot and its Markdown body. The caller, not this package, decides whether and how to use that text.
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog is an immutable collection of locally read snapshots. It owns no open filesystem handle and is safe for concurrent reads. It is not a live directory view or an authority registry.
func Load ¶
Load reads only SKILL.md in direct, valid-name child directories of an explicitly selected root. Missing documents and non-candidates are skipped. A malformed candidate, unreadable visible entry or exceeded bound fails without returning a partial catalog.
func (*Catalog) Activate ¶
func (c *Catalog) Activate(name, revision string) (Activation, error)
Activate returns the exact snapshotted body only for a matching reviewed revision. The digest is content identity, not permission or trust. No filesystem read, model request, tool registration or execution occurs.
type Config ¶
Config bounds one local catalog. Zero selects 64 skills and 64 KiB per document. Hard ceilings are 128 skills, 128 KiB/file and 1 MiB accepted raw document bytes in total.
type Document ¶
type Document struct {
Info Info `json:"info"`
License string `json:"license,omitempty"`
Compatibility string `json:"compatibility,omitempty"`
AllowedTools string `json:"allowed_tools,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
Body string `json:"body"`
}
Document is a parsed, reviewable snapshot. Optional fields are inert metadata; in particular AllowedTools never confers execution authority.