Documentation
¶
Index ¶
- Constants
- func DisplayPath(path, homeDir string) string
- func Install(embeddedFS fs.FS, target AgentTarget, version string) ([]string, error)
- func InstalledVersion(target AgentTarget) string
- func IsInstalled(target AgentTarget) bool
- func SkillDir(target AgentTarget) string
- func Uninstall(target AgentTarget) (bool, error)
- type AgentTarget
Constants ¶
const VersionFileName = versionFileName
VersionFileName is the name of the version tracking file written alongside skill files.
Variables ¶
This section is empty.
Functions ¶
func DisplayPath ¶
DisplayPath returns a user-friendly path with ~ for home directory.
func Install ¶
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.