skillcontent

package
v1.0.94 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT 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 skillcontent reads embedded skill content from an injected fs.FS rooted at the skill list (entries like "lark-calendar/SKILL.md").

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitArg

func SplitArg(arg string) (name, rest string)

SplitArg splits "<name>/<rest>" at the first separator; an argument with no separator is a bare skill name (rest "").

Types

type DirEntry

type DirEntry struct {
	Path  string `json:"path"`
	IsDir bool   `json:"is_dir"`
}

DirEntry.Path is skill-prefixed (e.g. "lark-doc/references/x.md") so it can be fed straight back into `read`.

type Reader

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

func New

func New(fsys fs.FS) *Reader

func (*Reader) List

func (r *Reader) List() ([]SkillInfo, error)

func (*Reader) ListPath

func (r *Reader) ListPath(arg string) ([]DirEntry, string, error)

ListPath lists one directory layer (no recursion) under "<name>" or "<name>/<sub>", returning the entries and the cleaned path listed.

func (*Reader) ReadReference

func (r *Reader) ReadReference(name, relpath string) ([]byte, string, error)

ReadReference returns the bytes of <name>/<relpath> and the cleaned path.

func (*Reader) ReadSkill

func (r *Reader) ReadSkill(name string) ([]byte, error)

type SkillInfo

type SkillInfo struct {
	Name        string         `json:"name"`
	Description string         `json:"description"`
	Version     string         `json:"version,omitempty"`
	Metadata    map[string]any `json:"metadata,omitempty"`
}

Jump to

Keyboard shortcuts

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