Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPreamble ¶
BuildPreamble returns a markdown section listing the given skills as a table. Only skills whose names appear in skillNames are included. If skillNames is empty the function returns "". The result is NOT cached.
func NeedsReconcile ¶ added in v0.139.2
NeedsReconcile reports whether ReconcileSkills would do real work for skillsDir — i.e. whether the on-disk stamp is missing or does not match the embedded FS hash. Callers can use this to surface a progress indicator only when the upcoming reconcile is going to be slow.
func ParseEmbedded ¶
ParseEmbedded reads all SKILL.md files from the embedded skills FS and returns a map of skill name -> definition. The result is cached after the first call.
func ReadBody ¶
ReadBody returns the frontmatter-stripped body of the named skill. Returns an error if the skill is not found in the embedded FS.
func ReconcileSkills ¶
ReconcileSkills mirrors every embedded skill directory to disk under skillsDir. For each top-level skill directory it walks the full subtree and writes every file (SKILL.md plus any companion assets such as user-guide/*.md). Files whose content already matches on disk are skipped; writes use atomic temp-file + rename.
A content hash of the embedded FS is persisted to a sibling stamp file after a successful reconcile. If the next call finds a matching stamp, the full walk is skipped — the common steady-state path where the binary hasn't been rebuilt. To force a re-reconcile (e.g. after manually editing or deleting an on-disk file), delete the stamp file.