Documentation
¶
Index ¶
- func New() *redant.Command
- func WriteJSON(w io.Writer, root *redant.Command, maxDepth int) error
- func WriteLLMSTxt(w io.Writer, root *redant.Command, maxDepth int) error
- func WriteSkill(w io.Writer, root *redant.Command, maxDepth int) error
- func WriteSkillDir(dir string, root *redant.Command, maxDepth int) error
- type SkillValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
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 WriteLLMSTxt ¶
WriteLLMSTxt writes the full command tree documentation to w.
func WriteSkill ¶ added in v0.4.0
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
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