skillartifact

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Kind      basespec.ArtifactKind = "agent.skill"
	SchemaID  basespec.SchemaID     = "agent.skill.v1"
	DecoderID basespec.DecoderID    = "agent.skill-markdown"

	SchemaVersion      = "v1"
	DefinitionFileName = "SKILL.md"
	InsertLabelKey     = "skill.insert"
)

Variables

This section is empty.

Functions

func ValidateDefinition

func ValidateDefinition(value definition.Definition) error

Types

type Argument

type Argument struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Default     string `json:"default,omitempty"`
}

type Body

type Body struct {
	Name           string         `json:"name"`
	DisplayName    string         `json:"displayName,omitempty"`
	Description    string         `json:"description"`
	Insert         string         `json:"insert"`
	Arguments      []Argument     `json:"arguments,omitempty"`
	Tags           []string       `json:"tags,omitempty"`
	MarkdownBody   string         `json:"markdownBody"`
	RawFrontmatter map[string]any `json:"rawFrontmatter,omitempty"`
}

func DecodeBody

func DecodeBody(raw json.RawMessage) (Body, error)

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

func NewDecoder

func NewDecoder(policy LocatorPolicy) (*Decoder, error)

func (*Decoder) Decode

func (d *Decoder) Decode(
	_ context.Context,
	candidate discovery.Candidate,
) ([]discovery.Decoded, []diagnostic.Diagnostic)

func (*Decoder) ID

func (*Decoder) ID() basespec.DecoderID

func (*Decoder) Recognize

func (d *Decoder) Recognize(
	_ context.Context,
	candidate discovery.Candidate,
) discovery.Recognition

func (*Decoder) Revision

func (*Decoder) Revision() string

type LocatorPolicy

type LocatorPolicy interface {
	ExpectedName(
		locator basespec.Locator,
	) (string, bool)
}

Jump to

Keyboard shortcuts

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