install

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 18 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 install applies a set of skills to the developer's machine: real copies in ~/.agents/skills, symlinks in ~/.claude/skills, backups of anything it has to overwrite, and the lockfile that records ownership.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition string

Condition is the state of an installed skill on disk.

const (
	OK       Condition = "ok"
	Modified Condition = "modified"
	Missing  Condition = "missing"
)

Conditions: the copy matches the lock, was edited, or is gone.

type Installer

type Installer struct {
	Paths       paths.Paths
	Now         func() time.Time
	KeepBackups int
}

Installer writes skills under a home directory.

func New

func New(p paths.Paths) *Installer

New returns an installer with the default settings.

func (*Installer) Apply

func (in *Installer) Apply(ctx context.Context, lock state.Lock, items []Item, keep ...string) (state.Lock, Report, error)

Apply makes the installed skills match items. Skills in lock that are neither in items nor in keep are removed; keep protects skills the caller could not prepare this time. A failing skill keeps its previous state and does not prevent the others from being applied.

Once ctx is done, no new install starts: the remaining skills keep their previous state and are reported as deferred. Removals still happen (they are renames, and a blocked skill must go), and deleting what was set aside is left to a later run.

func (*Installer) Check

func (in *Installer) Check(lock state.Lock) map[string]Condition

Check reports the on-disk condition of every locked skill.

func (*Installer) LatestBackup

func (in *Installer) LatestBackup(name string) (string, bool)

LatestBackup returns the most recent backup of local edits to a skill.

func (*Installer) Uninstall

func (in *Installer) Uninstall(lock state.Lock) (Report, error)

Uninstall removes every skill Skillcrew owns, backing up local edits.

type Item

type Item struct {
	ID     string
	Name   string // install name
	Commit string
	Source string // directory holding the skill files
	// SourceHash identifies the source content (e.g. its git tree id); it is
	// computed from Source when empty.
	SourceHash string
}

Item is a skill to install, as exported from the registry.

type Report

type Report struct {
	Installed []string
	Updated   []string
	Removed   []string
	// Deferred lists the skills left as they were because the deadline
	// passed; the next sync installs them.
	Deferred []string
	Notices  []string
}

Report summarizes what Apply changed.

Jump to

Keyboard shortcuts

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