skillgen

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package skillgen renders the committed skills/ tree from the command catalog.

OpenAPI plus overlay.yaml stay the single source of truth: one reference page is generated per public command, so the agent-facing docs cannot drift from the CLI surface. Only skills/pmock-shared is hand-written, because it describes conventions no spec field carries (access keys, envelope, exit codes, risk confirmation).

Index

Constants

View Source
const (
	// DefaultBinary is the command name used in every generated example.
	DefaultBinary = "pmock-cli"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Path    string
	Content []byte
}

File is one rendered file, relative to the skills root and slash-separated.

func Render

func Render(cat *spec.Catalog, opts Options) ([]File, error)

Render produces every file of the skills tree, sorted by path. The result is deterministic: inputs are sorted and nothing depends on the clock.

type ManualPage

type ManualPage struct {
	Skill   string
	Command string // full command path, e.g. "phone file upload"
	Summary string
	Risk    spec.Risk
	Body    string // markdown below the generated heading
}

ManualPage is a page the OpenAPI document cannot describe (a command written by hand). The generator still owns the file so pruning stays safe.

func DefaultManual

func DefaultManual() []ManualPage

DefaultManual lists hand-written pages that belong to generated skills.

type Options

type Options struct {
	Binary  string // defaults to DefaultBinary
	Version string // frontmatter version, defaults to "1.0.0"
	Skills  []Skill
	Manual  []ManualPage
}

Options configures Render.

type Skill

type Skill struct {
	Name        string     // directory name and frontmatter name
	Title       string     // heading shown in SKILL.md
	Description string     // frontmatter description, at most 1024 characters
	Intent      string     // hand-written paragraph under the heading
	CliHelp     string     // command whose help the skill mirrors
	Prefixes    [][]string // command-path prefixes this skill covers
}

Skill is one generated skill directory.

func DefaultSkills

func DefaultSkills() []Skill

DefaultSkills lists the skills this release generates. The phone skill is first because it covers the largest part of the API surface; the remaining skills follow the product areas a task usually starts from.

Jump to

Keyboard shortcuts

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