skill

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package skill renders the embedded moth agent skill: a SKILL.md + references/ directory (the Agent Skills format) teaching a coding agent both halves of moth — integrating the Flutter SDK into an app and administering an instance through the CLI. `moth skill export` writes it either with placeholders or interpolated with one project's real values, the agent equivalent of the admin SPA's setup-instructions page.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Export

func Export(dir string, format Format, v Values) ([]string, error)

Export renders the skill into dir (created if needed, existing files overwritten — exports are idempotent) and returns the dir-relative paths written, in a fixed order.

Types

type AppleValues

type AppleValues struct {
	Enabled    bool
	ServicesID string
	BundleIDs  []string
}

AppleValues is the public part of a project's Apple provider config.

type Format

type Format string

Format selects the flavor of the exported skill directory.

const (
	// FormatClaude follows Claude Code conventions: SKILL.md with YAML
	// name/description frontmatter, references linked relatively.
	FormatClaude Format = "claude"
	// FormatGeneric is the plain-markdown fallback for other agent
	// frameworks: README.md with a heading instead of frontmatter.
	FormatGeneric Format = "generic"
)

func ParseFormat

func ParseFormat(s string) (Format, error)

ParseFormat validates a --format flag value.

type GoogleValues

type GoogleValues struct {
	Enabled         bool
	WebClientID     string
	IOSClientID     string
	AndroidClientID string
}

GoogleValues is the public part of a project's Google provider config.

type Values

type Values struct {
	// Endpoint is the instance base URL, no trailing slash.
	Endpoint       string
	ProjectName    string
	Slug           string
	PublishableKey string
	JWKSURL        string
	Issuer         string
	Audience       string
	// SDKVersion is the pubspec version constraint for the served
	// moth_auth package (pre-releases pinned exactly, releases careted).
	SDKVersion string
	Google     GoogleValues
	Apple      AppleValues
	// Interpolated says whether the values above are a real project's
	// (true) or the documented placeholders (false).
	Interpolated bool
}

Values is everything the templates interpolate. Placeholders() returns the un-interpolated defaults; `moth skill export --project` fills the struct from the admin RPCs instead.

func Placeholders

func Placeholders() Values

Placeholders returns the un-interpolated template values. The strings are deliberately loud, greppable placeholders; SKILL.md documents each one and where its real value comes from.

Jump to

Keyboard shortcuts

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