Documentation
¶
Overview ¶
Package skill manages downloadable, on-demand instruction packs ("skills"). A skill is a markdown file with light YAML-ish frontmatter (name, description, optional when). Only ENABLED skills contribute a single index line to the system prompt; the model pulls a skill's full body on demand through the skill tool. So the base prompt stays lean no matter how many skills are installed — the same guides-on-demand idea, but user-extensible and downloadable.
Index ¶
- type Skill
- type Store
- func (s *Store) Body(name string) (string, error)
- func (s *Store) Get(name string) (Skill, bool)
- func (s *Store) HasEnabled() bool
- func (s *Store) Index() string
- func (s *Store) Install(ctx context.Context, source string) ([]string, error)
- func (s *Store) List() []Skill
- func (s *Store) Remove(name string) error
- func (s *Store) SetEnabled(name string, on bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Skill ¶
type Skill struct {
Name string
Description string
When string
Body string
Enabled bool
Source string
}
Skill is one instruction pack.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the on-disk skills directory plus the enabled/source state. The same *Store is shared between the foreground and background/sub-agent tool registries, so state access must be safe for concurrent use.
func (*Store) HasEnabled ¶
HasEnabled reports whether at least one skill is enabled (the skill tool and the prompt index are only wired in when this is true).
func (*Store) Index ¶
Index is the compact, prompt-facing catalog of ENABLED skills — one line each, "- name: description". Empty when none are enabled, so the base prompt is untouched until skills are actually in use.
func (*Store) Install ¶
Install downloads skills from a source and enables them. The source is a URL to a single .md file, or a git repository (cloned; every *.md at its root or under skills/ is imported). Returns the installed skill names.