skillmd

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFallbackDescription

func ExtractFallbackDescription(body string) string

ExtractFallbackDescription returns the first prose paragraph in body.

It skips headings, list items, blockquotes, tables, and fenced code blocks. The returned paragraph has collapsed whitespace.

Types

type Doc

type Doc struct {
	Name        string
	Description string
	Body        string
	Changed     bool
}

Doc is the parsed and normalized view of a SKILL.md file.

func Normalize

func Normalize(dirName string, content []byte) (Doc, []byte, error)

Normalize parses SKILL.md content and returns a canonical representation.

It rewrites frontmatter deterministically, preserving unrelated keys while normalizing name and description. Missing name is filled from dirName and missing description is filled from the first prose paragraph in the body.

Jump to

Keyboard shortcuts

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