Documentation
¶
Overview ¶
Package skillsync mirrors skill files across all agent skill directories (~/.claude/skills, ~/.codex/skills, ~/.gemini/skills, ~/.agents/skills) without symlinks. Any file in any dir is copied to all others. Newest mtime wins on conflict so no work is lost.
Index ¶
- func DeleteEntry(name string) (int, error)
- func DeleteEntryFromDir(dir, name string) error
- func DeleteFromAll(filename string) (int, error)
- func DirLabel(dir string) string
- func KnownDirs() []string
- func ReadFile(filename string) ([]byte, string, error)
- func ZipEntry(entryName string) ([]byte, error)
- type ProviderLocation
- type Result
- type SkillEntry
- type SkillFile
- type SkillInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteEntry ¶
DeleteEntry removes entryName (file or folder recursively) from all dirs.
func DeleteEntryFromDir ¶
DeleteEntryFromDir removes entryName only from one specific dir.
func DeleteFromAll ¶
DeleteFromAll removes a skill file from all known dirs.
Types ¶
type ProviderLocation ¶ added in v0.14.1
type ProviderLocation struct {
Label string `json:"label"`
Dir string `json:"dir"`
Path string `json:"path"` // full path to the skill entry (folder or file)
}
ProviderLocation is one provider that has a skill, with its full path.
type Result ¶
Result is returned by Sync and Upload.
type SkillEntry ¶
type SkillEntry struct {
Name string // entry name (folder or filename)
IsDir bool // true if it's a folder in at least one dir
Sources []string // dirs where this entry exists
Missing []string // dirs where this entry is absent
Newest time.Time // mtime of newest copy
}
SkillEntry represents one top-level entry (file or folder) found across skill dirs.
func ListDir ¶
func ListDir(entryName string) ([]SkillEntry, []string, error)
ListDir returns entries inside a specific subfolder across all skill dirs. entryName is a top-level folder name (e.g. "imagegen"). Returns entries found in any dir, deduped by name, isDir tracked. Second return is the list of dirs where entryName exists.
type SkillFile ¶
type SkillFile = SkillEntry
SkillFile is an alias kept for callers that only care about files.
type SkillInfo ¶ added in v0.14.1
type SkillInfo struct {
Name string `json:"name"`
IsDir bool `json:"is_dir"`
Meta map[string]string `json:"meta"`
InProviders []ProviderLocation `json:"in_providers"`
MissingProviders []ProviderLocation `json:"missing_providers"`
}
SkillInfo is an enriched skill entry — name, metadata, and per-provider locations.
func ListSkills ¶ added in v0.14.1
func ListSkills() []SkillInfo
ListSkills returns enriched SkillInfo for every top-level entry across all known skill dirs, including parsed metadata and per-provider paths.