skill

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSkill added in v0.1.1

func AddSkill(ctx context.Context, cwd string, source string, agents []agent.Agent) extension.Outcome

AddSkill installs a skill from a local source path.

func ApplySkill added in v0.1.1

func ApplySkill(ctx context.Context, mgr manager.ExtensionManager[*skilldomain.Skill], cwd, home string, skill *skilldomain.Skill, choices []extension.Choice) error

ApplySkill applies pending skill bind/unbind changes.

func DisplayAgent added in v0.1.1

func DisplayAgent(agents []agent.Agent) agent.Agent

DisplayAgent builds a combined agent label for a shared skills directory row.

func FormatFrontmatterForTest

func FormatFrontmatterForTest(md string) string

func InitSkill added in v0.1.1

func InitSkill(ctx context.Context, cwd string, name string) extension.Outcome

InitSkill creates a new skill template on disk.

func InitializeSkill

func InitializeSkill(root, name string) (string, string, error)

func NewSkillChoices added in v0.1.1

func NewSkillChoices(cwd, home string, skill *skilldomain.Skill) []extension.Choice

NewSkillChoices builds bind rows for unique skill directory groups.

func ParseSkillFile

func ParseSkillFile(filePath string) (*skilldomain.Skill, error)

func PreviewMarkdown added in v0.1.1

func PreviewMarkdown(skill skilldomain.Skill) (string, error)

PreviewMarkdown builds the markdown document for a skill preview (no terminal rendering).

func RemoveSkill added in v0.1.1

RemoveSkill removes a skill from disk.

func RenderCommandPreview

func RenderCommandPreview(name, usage, summary string, implemented bool) string

func RenderSkillPreview

func RenderSkillPreview(skill skilldomain.Skill, width int) (string, error)

RenderSkillPreview renders a skill preview for the TUI (markdown + glamour).

func SkillDirGroupBoundOnDisk added in v0.1.1

func SkillDirGroupBoundOnDisk(skill *skilldomain.Skill, rep agent.Agent, projectRoot, home string) bool

SkillDirGroupBoundOnDisk is true when the skill lives in the shared dir or a symlink there points at it.

func ToggleDisableSkill added in v0.1.1

ToggleDisableSkill toggles a skill's disabled state.

func UpdateAllSkills added in v0.1.1

func UpdateAllSkills(ctx context.Context, skills []*skilldomain.Skill) extension.Outcome

UpdateAllSkills updates every managed local skill concurrently.

func UpdateSingleSkill added in v0.1.1

func UpdateSingleSkill(ctx context.Context, sk *skilldomain.Skill) extension.Outcome

UpdateSingleSkill updates a single managed local skill from its source.

Types

type InstallResult

type InstallResult struct {
	Name       string
	SourcePath string
	TargetPath string
}

func InstallLocalSkill

func InstallLocalSkill(workspaceRoot, home string, scope extension.Scope, source string, agents []agent.Agent) (InstallResult, error)

func InstallRegistrySkill

func InstallRegistrySkill(workspaceRoot, home string, scope extension.Scope, source string, files []RegistrySnapshotFile, agents []agent.Agent) (InstallResult, error)

InstallRegistrySkill writes a registry snapshot into each selected agent's skills directory.

type RegistrySnapshotFile

type RegistrySnapshotFile struct {
	Path     string
	Contents string
}

RegistrySnapshotFile is one file from a skills.sh download bundle.

type SkillScanStrategy

type SkillScanStrategy struct{}

func (SkillScanStrategy) AgentDir

func (s SkillScanStrategy) AgentDir(a agent.Agent) string

func (SkillScanStrategy) Dedupe

func (s SkillScanStrategy) Dedupe(skills []*skilldomain.Skill) []*skilldomain.Skill

func (SkillScanStrategy) DefaultDir

func (s SkillScanStrategy) DefaultDir() string

func (SkillScanStrategy) ParseFile

func (s SkillScanStrategy) ParseFile(filePath, projectRoot, home string, scope extension.Scope) (*skilldomain.Skill, error)

func (SkillScanStrategy) SkipDir

func (s SkillScanStrategy) SkipDir(dirName string) bool

func (SkillScanStrategy) TargetFiles

func (s SkillScanStrategy) TargetFiles() []string

type UpdateResult

type UpdateResult struct {
	Name       string
	SourcePath string
	TargetPath string
}

func UpdateSkill

func UpdateSkill(skill skilldomain.Skill) (UpdateResult, error)

Jump to

Keyboard shortcuts

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