llmstxtcmd

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *redant.Command

New returns a "llms-txt" command that prints a structured plain-text overview of the entire command tree, optimised for LLM consumption.

The output follows the llms.txt convention (https://llmstxt.org/): human-readable Markdown that is also easy for language models to parse and grep.

func WriteJSON

func WriteJSON(w io.Writer, root *redant.Command, maxDepth int) error

WriteJSON writes the command tree as a JSON document to w.

func WriteLLMSTxt

func WriteLLMSTxt(w io.Writer, root *redant.Command, maxDepth int) error

WriteLLMSTxt writes the full command tree documentation to w.

func WriteSkill added in v0.4.0

func WriteSkill(w io.Writer, root *redant.Command, maxDepth int) error

WriteSkill writes the command tree as SKILL.md documents following the standard format: YAML frontmatter (---) + # title + ## 使用场景 + usage example. Each leaf command becomes a separate skill entry.

func WriteSkillDir added in v0.4.0

func WriteSkillDir(dir string, root *redant.Command, maxDepth int) error

WriteSkillDir writes each leaf command as a separate SKILL.md file under dir. Directory structure follows generated skill names:

<dir>/<skill-name>/SKILL.md

The SKILL.md name field uses full command path joined by hyphens. The directory name matches the name field per the Agent Skills specification.

Types

type SkillValidationError added in v0.4.0

type SkillValidationError struct {
	Name   string   // skill name (may be invalid itself)
	Errors []string // human-readable error descriptions
}

SkillValidationError collects one or more validation problems for a skill entry.

func (*SkillValidationError) Error added in v0.4.0

func (e *SkillValidationError) Error() string

Jump to

Keyboard shortcuts

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