Help us shape the future of Go! Take the 2026 Go Developer Survey

templates

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const GeneralSkillsRepository = "https://github.com/nicholasjconn/skills.git"

GeneralSkillsRepository is the canonical source of the external catalog.

Variables

FS contains the embedded default templates for installation and generation.

View Source
var ReadFunc = func(path string) ([]byte, error) {
	return fs.ReadFile(FS, path)
}

ReadFunc is the function used by Read. Tests can replace it to simulate errors.

View Source
var RetiredSkillNames = []string{"implement", "ship-pr", "auto-skill-loop", "audit-documentation", "audit-memory", "audit-tests", "interface-audit", "find-docs", "playwright", "tavily-web"}

RetiredSkillNames identifies protected legacy local slots; it contains no content.

View Source
var WalkFunc = func(root string, fn fs.WalkDirFunc) error {
	return fs.WalkDir(FS, root, fn)
}

WalkFunc is the function used by Walk. Tests can replace it to simulate errors.

Functions

func IsRetiredSkill added in v1.0.0

func IsRetiredSkill(name string) bool

IsRetiredSkill reports names whose former bundled local slot must be preserved.

func IsSafeCLISkillCatalogID added in v0.24.0

func IsSafeCLISkillCatalogID(id string) bool

IsSafeCLISkillCatalogID returns true for single-segment catalog ids that can be used as .agent-layer/skills/<id>/ directory names.

func Read

func Read(path string) ([]byte, error)

Read returns the contents of an embedded template file.

func Walk

func Walk(root string, fn fs.WalkDirFunc) error

Walk walks the embedded template filesystem under the given root.

Types

type CLISkillCatalogEntry added in v0.24.0

type CLISkillCatalogEntry struct {
	ID              string
	Name            string
	Binary          string   `toml:"binary"`
	OwnershipMarker string   `toml:"ownership_marker"`
	Repository      string   `toml:"repository"`
	Selectors       []string `toml:"selectors"`
}

CLISkillCatalogEntry describes one CLI skill catalog option. Git entries derive destination names from their exact source paths; the catalog ID identifies the checkbox, including grouped selections. Binary names the external CLI the skill requires, if any.

func LoadCLISkillCatalog added in v0.24.0

func LoadCLISkillCatalog() ([]CLISkillCatalogEntry, error)

LoadCLISkillCatalog parses the embedded cli-skills-catalog.toml file into typed catalog entries. Errors loudly when the catalog is missing, malformed, contains no entries, or contains an entry with an invalid or duplicate id, name, or member.

func ParseCLISkillCatalog added in v1.0.0

func ParseCLISkillCatalog(data []byte, read func(string) ([]byte, error)) ([]CLISkillCatalogEntry, error)

ParseCLISkillCatalog validates source coordinates and retained embedded trees. The release generator supplies its filesystem reader to share runtime validation.

func (CLISkillCatalogEntry) SkillNames added in v1.0.0

func (e CLISkillCatalogEntry) SkillNames() []string

SkillNames returns the declared destination names in selector order.

Jump to

Keyboard shortcuts

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