discovery

package
v1.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAgentSkillMetadata

func ValidateAgentSkillMetadata(meta SkillMeta) error

ValidateAgentSkillMetadata checks the name and description fields required by agentskills registries before publishing.

Types

type Skill

type Skill struct {
	Name           string
	Description    string   // short description from SKILL.md frontmatter or first paragraph
	RawDescription string   // untruncated description from SKILL.md frontmatter or first paragraph
	Source         Source   // optional upstream attribution from SKILL.md frontmatter
	Package        string   // parent package name if skill is a symlink sub-skill (e.g. "gstack")
	LocalPath      string   // absolute path on disk
	ContentHash    string   // deterministic content fingerprint
	Targets        []string // from state if tracked, else inferred from location
	Modified       bool     // SKILL.md hash differs from installed_hash in state
	Conflicted     bool     // SKILL.md contains unresolved merge conflict markers
	Revision       int      // from state
	Managed        bool     // tracked in state AND LocalPath is inside ~/.scribe/skills/
	// IsPackage reports whether this row represents a ~/.scribe/packages/<name>/
	// tree package rather than a regular skill. Packages self-install and
	// don't get projected into tool skill dirs.
	IsPackage bool
}

Skill represents a skill found on disk, optionally enriched with state info.

func OnDisk

func OnDisk(st *state.State) ([]Skill, error)

OnDisk scans ~/.scribe/skills/ plus tool-facing install locations that are directly visible on disk. Cross-references state.json for tracked skill metadata. Deduplicates by skill name, preferring the canonical Scribe store. Gemini-managed installs are not scanned from disk in v1; Scribe relies on state for those.

type SkillMeta

type SkillMeta struct {
	Name           string
	Description    string
	RawDescription string
	Version        string
	Author         string
	Source         Source
}

SkillMeta holds metadata parsed from SKILL.md frontmatter.

func ParseSkillMetadata

func ParseSkillMetadata(data []byte) (SkillMeta, error)

ParseSkillMetadata extracts SKILL.md frontmatter from bytes.

func ReadSkillMetadata

func ReadSkillMetadata(skillDir string) (SkillMeta, error)

ReadSkillMetadata extracts SKILL.md metadata from a skill directory.

type Source

type Source struct {
	URL    string `yaml:"url" json:"url,omitempty"`
	Author string `yaml:"author" json:"author,omitempty"`
	Note   string `yaml:"note" json:"note,omitempty"`
}

Source holds optional upstream attribution parsed from SKILL.md frontmatter.

Jump to

Keyboard shortcuts

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