skills

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const VersionFileName = versionFileName

VersionFileName is the name of the version tracking file written alongside skill files.

Variables

This section is empty.

Functions

func DisplayPath

func DisplayPath(path, homeDir string) string

DisplayPath returns a user-friendly path with ~ for home directory.

func Install

func Install(embeddedFS fs.FS, target AgentTarget, version string) ([]string, error)

Install writes embedded skill files to the target's skill directory. It creates directories as needed and writes a version file for tracking.

func InstalledVersion

func InstalledVersion(target AgentTarget) string

InstalledVersion reads the version from an installed skill directory. Returns empty string if not installed or version file is missing.

func IsInstalled

func IsInstalled(target AgentTarget) bool

IsInstalled checks if the skill is installed for a given target.

func SkillDir

func SkillDir(target AgentTarget) string

SkillDir returns the full path to the skill directory for a given target.

func Uninstall

func Uninstall(target AgentTarget) (bool, error)

Uninstall removes the skill directory from the target's location. Returns true if something was removed, false if nothing existed.

Types

type AgentTarget

type AgentTarget struct {
	Name    string // e.g. "Claude Code"
	Key     string // e.g. "claude" (used in --agent flag)
	BaseDir string // e.g. "~/.claude/skills" (expanded at runtime)
}

AgentTarget represents an AI coding agent that supports the Agent Skills standard.

func DefaultTargets

func DefaultTargets(homeDir string) []AgentTarget

DefaultTargets returns the supported agent targets with expanded home directory paths.

func DetectAgents

func DetectAgents(targets []AgentTarget) []AgentTarget

DetectAgents returns targets whose parent agent directory exists (e.g. ~/.claude/ exists means Claude Code is likely installed).

func InstalledTargets

func InstalledTargets(targets []AgentTarget) []AgentTarget

InstalledTargets returns targets that have the skill installed.

Jump to

Keyboard shortcuts

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