install

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Embedded

func Embedded() []byte

Embedded returns the embedded skill contents.

func Install

func Install() (string, bool, error)

Install writes the embedded skill to the Claude Code skill location (user scope).

func InstallTo

func InstallTo(baseDir string) (string, bool, error)

InstallTo writes the embedded skill to the Claude Code skill location under baseDir (user scope).

func InstallToProject added in v0.2.0

func InstallToProject(projectRoot string) (string, bool, error)

InstallToProject writes the embedded skill to the project-scoped Claude Code skill location. projectRoot should be the git root of the project.

func ProjectSkillPath added in v0.2.0

func ProjectSkillPath(projectRoot string) string

ProjectSkillPath returns the Claude Code skill path for project scope.

func SkillPath

func SkillPath(baseDir string) string

SkillPath returns the Claude Code skill path for the given base directory (usually the user's home directory).

func Uninstall

func Uninstall() (string, error)

Uninstall removes the skill from the Claude Code skill location (user scope).

func UninstallFrom

func UninstallFrom(baseDir string) (string, error)

UninstallFrom removes the skill from the Claude Code skill location under baseDir.

Types

type AutoUpdateResult

type AutoUpdateResult struct {
	UpdatedSkill bool
}

AutoUpdateResult captures which installed components were updated to match embedded assets.

func AutoUpdateIfInstalled

func AutoUpdateIfInstalled(baseDir string) (AutoUpdateResult, error)

type LegacyClaudePluginMigrationOnceResult added in v0.2.0

type LegacyClaudePluginMigrationOnceResult struct {
	Ran        bool
	Migration  LegacyClaudePluginMigrationResult
	MarkerPath string
}

func RunLegacyClaudePluginMigrationOnce added in v0.2.0

func RunLegacyClaudePluginMigrationOnce(homeDir string) (LegacyClaudePluginMigrationOnceResult, error)

type LegacyClaudePluginMigrationResult added in v0.2.0

type LegacyClaudePluginMigrationResult struct {
	RemovedLegacyPluginDir   bool
	RemovedLegacySettingsKey bool
	SkippedSettingsMalformed bool

	PluginDir    string
	SettingsPath string
}

func MigrateLegacyClaudePluginInstall added in v0.2.0

func MigrateLegacyClaudePluginInstall(homeDir string) (LegacyClaudePluginMigrationResult, error)

MigrateLegacyClaudePluginInstall cleans up artifacts created by the old (broken) plugin installer.

Conservative behavior: - Always best-effort delete ~/.claude/plugins/subtask (does not error if missing). - Only edits settings.json if it exists and contains enabledPlugins as an object containing {"subtask": true}. - If settings.json is malformed JSON, it is left untouched and SkippedSettingsMalformed is set.

type SkillStatus

type SkillStatus struct {
	Path            string
	Installed       bool
	UpToDate        bool
	EmbeddedSHA256  string
	InstalledSHA256 string
}

SkillStatus describes the installation state of the embedded skill.

func GetSkillStatus

func GetSkillStatus() (SkillStatus, error)

GetSkillStatus returns installation status for the Claude Code skill location (user scope).

func GetSkillStatusFor

func GetSkillStatusFor(baseDir string) (SkillStatus, error)

GetSkillStatusFor returns status for baseDir without consulting environment.

Jump to

Keyboard shortcuts

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