skills

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package skills delivers the Agent Skills folders the Arvel host prepares for a session (PROTOCOL §7.1 item 5a) to a vendor CLI that reads project skills from a directory inside the session's working directory.

Materialize copies each folder into the first project skills directory, hides the copies from git through the worktree's info/exclude, prefixes a folder with "arvel-" when the repository already has a skill of that name, turns invocation "manual" into disable-model-invocation: true, and returns a cleanup function that removes only that call's uniquely marked copies. Source folders are only read. Existing marked copies are never reclaimed; if both names are occupied Materialize returns ErrNameTaken. Abandoned copies need separate recovery after proving that no active task uses them. Use isolated session working directories when skill selections differ. Materialize does not disable external/global vendor skills or manage host catalogue selections.

Materialize starts the git binary (through procx) to find info/exclude, so a plugin that calls it must list "git" in permissions.spawn of its manifest. Without git, or outside a git work tree, the copies are still made but nothing is excluded.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotASkill is returned for a source folder without a SKILL.md file.
	ErrNotASkill = errors.New("skills: not a skill folder (SKILL.md missing)")
	// ErrTooLarge is returned for a skill folder over the entry or size limit.
	ErrTooLarge = errors.New("skills: skill folder too large")
	// ErrBadName is returned for an unsafe or duplicate skill name or an invalid invocation.
	ErrBadName = errors.New("skills: invalid skill name")
	// ErrBadDir is returned when the skills directory is missing or not a local relative path.
	ErrBadDir = errors.New("skills: invalid skills directory")
	// ErrNameTaken is returned when neither the skill name nor its "arvel-" form is free.
	ErrNameTaken = errors.New("skills: skill name already taken")
)

Sentinel errors of the package.

Functions

func Materialize

func Materialize(cwd string, dirs []string, refs []protocol.SkillRef) (cleanup func(), err error)

Materialize copies the skill folders of refs into the first directory of dirs (relative to cwd), excludes the copies from git, and returns a function that removes them again. The returned function is never nil and is safe to call more than once; on error everything done so far has been rolled back. Existing copies, including marked copies, are never reclaimed automatically. If both the requested name and its arvel- form are occupied, ErrNameTaken is returned; use a separate session working directory to isolate more sessions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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