skills

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 22 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 skills installs the CubePath agent skills (github.com/CubePathInc/skills) into the skill directories of the AI coding agents on this machine.

Index

Constants

This section is empty.

Variables

View Source
var Targets = []Target{
	{ID: "claude", Name: "Claude Code", /* contains filtered or unexported fields */},
	{ID: "agents", Name: "Codex, Gemini CLI, Cursor", /* contains filtered or unexported fields */},
}

Targets lists every place skills can be installed. Claude Code reads ~/.claude/skills; Codex, Gemini CLI and Cursor read ~/.agents/skills.

Functions

func ClaudePluginInstalled

func ClaudePluginInstalled() bool

ClaudePluginInstalled reports whether the CubePath plugin is installed in Claude Code, in which case copying the skills into ~/.claude/skills would load them twice.

func LatestVersion

func LatestVersion(ctx context.Context) (string, error)

LatestVersion returns the tag of the latest release, e.g. "v0.1.0".

Types

type Bundle

type Bundle struct {
	Manifest Manifest
	// Dir holds one directory per skill.
	Dir string
	// contains filtered or unexported fields
}

Bundle is a downloaded, verified and extracted release.

func Download

func Download(ctx context.Context, tag string) (*Bundle, error)

Download fetches a release ("" = latest), checks it against SHA256SUMS and extracts it to a temporary directory. The caller must call Cleanup.

func (*Bundle) Cleanup

func (b *Bundle) Cleanup()

Cleanup removes the extracted files.

type Installed

type Installed struct {
	Name     string `json:"name"`
	Version  string `json:"version"`
	Modified bool   `json:"modified"` // edited since cubecli installed it
}

Installed is a skill found in a target directory.

func List

func List(dir string) ([]Installed, error)

List returns the cubecli-managed skills in dir.

type Manifest

type Manifest struct {
	Version           string   `json:"version"`
	MinCubecliVersion string   `json:"min_cubecli_version"`
	Skills            []string `json:"skills"`
}

Manifest is manifest.json at the root of a skills release.

type Outcome

type Outcome struct {
	Name   string `json:"name"`
	Action string `json:"action"` // installed, updated, unchanged, skipped, removed
	Reason string `json:"reason,omitempty"`
}

Outcome of installing or removing one skill.

func Install

func Install(b *Bundle, dir string, force bool) ([]Outcome, error)

Install copies every skill of the bundle into dir. Existing directories that cubecli did not create, or that the user modified, are skipped unless force.

func Uninstall

func Uninstall(dir string, force bool) ([]Outcome, error)

Uninstall removes the cubecli-managed skills in dir. Modified ones are kept unless force.

type Target

type Target struct {
	ID   string // value of --agent
	Name string // who reads it, for humans
	// contains filtered or unexported fields
}

Target is a skills directory read by one or more agents.

func DefaultTargets

func DefaultTargets() []Target

DefaultTargets returns the detected targets, leaving out Claude Code when the plugin already provides the skills there.

func TargetByID

func TargetByID(id string) (Target, bool)

TargetByID returns the target with the given --agent value.

func (Target) Detected

func (t Target) Detected() bool

Detected reports whether one of the agents reading this target seems to be installed.

func (Target) Dir

func (t Target) Dir(project bool) (string, error)

Dir is the skills directory: under $HOME, or under the current directory for a project install (committed with the repository).

Jump to

Keyboard shortcuts

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