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

skills

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package skills embeds the Backyard agent skill (skills/backyard/**), the single source of truth for agent-facing documentation. It is installed into projects by `backyard init` / `backyard skill install`, served as /llms.txt, and returned by the MCP tool backyard_docs.

The tree is a Claude Code Agent Skill: backyard/SKILL.md (YAML front matter + overview) and backyard/references/*.md (API reference, recipes, deploy guide) loaded on demand. The documents use HubURLPlaceholder wherever they mean "the hub URL"; LLMSFullTxt replaces it with the server's public URL.

Index

Constants

View Source
const HubURLPlaceholder = "https://backyard.example.com"

HubURLPlaceholder is the hub URL the embedded documents use in examples (sites appear as https://<site>.backyard.example.com/ or https://backyard.example.com/s/<site>/). LLMSFullTxt replaces it with the server's public URL; other renderers (e.g. the Cloudflare edition) should do the same.

Variables

This section is empty.

Functions

func FS

func FS() fs.FS

FS returns the skill tree rooted so that "backyard/SKILL.md" exists.

func LLMSFullTxt

func LLMSFullTxt(publicURL string) string

LLMSFullTxt returns SKILL.md followed by every reference document. HubURLPlaceholder is replaced with publicURL (when non-empty) and links between the documents point at <publicURL>/docs/<name>.md. Results are cached per public URL (the documents never change at run time).

func LLMSTxt

func LLMSTxt(publicURL string) string

LLMSTxt returns the /llms.txt document (concise; links to /llms-full.txt). publicURL is the hub URL (e.g. "https://backyard.acme.com"); when empty, links are server-relative.

func Localize

func Localize(md, publicURL string) string

Localize adapts an embedded document (SKILL.md or a reference) to the hub at publicURL: HubURLPlaceholder becomes publicURL and, when publicURL has no path, example site hosts under the placeholder domain ("https://<site>.backyard.example.com/") become subdomains of the hub host. Links between the documents are left as they are. With an empty publicURL, md is returned unchanged. Serve documents through Localize (e.g. /docs/<name>.md) so they match /llms-full.txt.

func Reference

func Reference(name string) string

Reference returns backyard/references/<name>.md ("" if missing). The name is matched case-insensitively and may carry a ".md" suffix; anything that is not a plain document name (paths, "..") yields "".

func References

func References() []string

References returns the names of the reference documents (for Reference), in reading order: api, recipes, deploy, then any others alphabetically.

func SkillMarkdown

func SkillMarkdown() string

SkillMarkdown returns backyard/SKILL.md.

Types

This section is empty.

Jump to

Keyboard shortcuts

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