skill

package
v0.1.0-alpha.7 Latest Latest
Warning

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

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

Documentation

Overview

Package skill installs the SAM agent skill into the directories local AI agents scan, so an agent can bootstrap a node and drive the mesh without the user pasting instructions by hand.

Index

Constants

View Source
const (
	// Name is the directory an installed skill lives in.
	Name = "sam-mesh"
)

Variables

View Source
var Content = samskill.Markdown

Content is the skill document installed for local agents.

Functions

This section is empty.

Types

type State

type State string

State is what a target holds relative to the embedded skill.

const (
	// StateMissing means no skill is installed for this target.
	StateMissing State = "not installed"
	// StateOutdated means an older or edited skill is installed.
	StateOutdated State = "outdated"
	// StateCurrent means the installed skill matches this binary's.
	StateCurrent State = "up to date"
)

func Inspect

func Inspect(t Target) (State, error)

Inspect reports the state of t without modifying anything.

func Install

func Install(t Target) (State, error)

Install writes the skill to t, creating parent directories as needed. It reports the state found before writing, so callers can tell an install from an upgrade from a no-op.

type Target

type Target struct {
	// Agent names the tool that reads this directory.
	Agent string
	// Root is the skills directory, e.g. ~/.claude/skills.
	Root string
}

Target is a directory tree that an agent scans for skills.

func CustomTarget

func CustomTarget(root string) Target

CustomTarget installs into an explicit skills directory.

func ProjectTargets

func ProjectTargets(dir string) []Target

ProjectTargets are the skill directories scoped to the project rooted at dir.

func UserTargets

func UserTargets(home string) []Target

UserTargets are the per-user skill directories, shared by every project.

func (Target) Path

func (t Target) Path() string

Path is the file this target installs to.

Jump to

Keyboard shortcuts

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