skill

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile

func ReadFile(ctx context.Context, reg capsskill.Registry, name, rel string) (capsskill.Content, error)

ReadFile loads a supporting file from the skill directory identified by name.

func RenderLoaded

func RenderLoaded(content capsskill.Content) string

RenderLoaded formats a loaded skill for the model, including resource-base guidance.

func SanitizeRelativePath

func SanitizeRelativePath(rel string) (string, error)

SanitizeRelativePath rejects paths that escape a skill bundle directory.

Types

type RunResult

type RunResult struct {
	Name     string
	Path     string
	Script   string
	Args     []string
	ExitCode int
	Stdout   string
	Stderr   string
}

RunResult is the outcome of executing one script inside a skill directory.

func RunScript

func RunScript(ctx context.Context, reg capsskill.Registry, name, rel string, args []string, timeout time.Duration) (RunResult, error)

RunScript executes a script relative to the skill directory identified by name.

Jump to

Keyboard shortcuts

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