parser

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package parser provides a reusable parser for SKILL.md files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractForgeReqs

ExtractForgeReqs extracts SkillRequirements, egress_domains, and guardrails from the generic metadata map by re-marshaling metadata["forge"] through yaml round-trip into ForgeSkillMeta.

func Parse

func Parse(r io.Reader) ([]contract.SkillEntry, error)

Parse reads skill entries from an io.Reader and extracts structured SkillEntry values.

Supported formats:

  • "## Tool: <name>" heading starts a new entry; paragraph lines become Description
  • "**Input:** <text>" sets InputSpec on the current entry
  • "**Output:** <text>" sets OutputSpec on the current entry
  • "- <name>" (single-word/hyphenated list item) creates an entry with Name only (legacy)

func ParseWithMetadata

func ParseWithMetadata(r io.Reader) ([]contract.SkillEntry, *contract.SkillMetadata, error)

ParseWithMetadata extracts optional YAML frontmatter (between --- delimiters) then passes the markdown body through existing Parse(). Returns entries with metadata attached, plus the top-level SkillMetadata.

Types

This section is empty.

Jump to

Keyboard shortcuts

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