skill

package
v0.0.0-...-99b4d36 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(src, dst string) error

CopyDir recursively copies src into dst, preserving file mode bits (so executable scripts inside a skill keep their +x). Symlinks are recreated as symlinks rather than followed.

func FormatDiff

func FormatDiff(diffs []FileDiff) string

func HasDifferences

func HasDifferences(srcDir, dstDir string) (bool, error)

func ListSkillFiles

func ListSkillFiles(skillDir string) ([]string, error)

func RemoveSkillDir

func RemoveSkillDir(path string) error

func ReplaceDir

func ReplaceDir(src, dst string) error

ReplaceDir atomically replaces dst with a copy of src. It copies into a temporary sibling directory first, then swaps it into place with rename, so a failure mid-copy never leaves dst partially written.

func SymlinkDir

func SymlinkDir(src, dst string) error

Types

type FileDiff

type FileDiff struct {
	RelPath    string
	Status     string // "modified", "added", "deleted"
	OldContent string
	NewContent string
	Binary     bool
}

func CompareSkillDirs

func CompareSkillDirs(srcDir, dstDir string) ([]FileDiff, error)

type Skill

type Skill struct {
	Name        string `yaml:"name" json:"name"`
	Description string `yaml:"description" json:"description"`
	Path        string `yaml:"-" json:"path"`
	RawContent  string `yaml:"-" json:"-"`
}

func DiscoverSkills

func DiscoverSkills(basePath string) ([]*Skill, error)

func ParseSkillMd

func ParseSkillMd(path string) (*Skill, error)

Jump to

Keyboard shortcuts

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