validator

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package validator provides validation for Skill structs per the Agent Skills Specification.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Validator)

Option configures a Validator.

func WithStrict

func WithStrict(strict bool) Option

WithStrict enables strict validation mode. In strict mode, AllowedTools syntax is validated using the toolperm parser.

type Validator

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

Validator validates Skill structs against the Agent Skills Specification.

func New

func New(opts ...Option) *Validator

New creates a new Validator with the given options.

func (*Validator) Validate

func (v *Validator) Validate(s *claude.Skill) *validator.Result

Validate checks a Skill for compliance with the Agent Skills Specification. Returns a Result containing errors and warnings.

func (*Validator) ValidateWithPath

func (v *Validator) ValidateWithPath(s *claude.Skill, path string) *validator.Result

ValidateWithPath validates a Skill and additionally checks that the skill name matches the containing directory name. The path should be the path to the skill file.

Jump to

Keyboard shortcuts

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