Nous.Skill.Loader (nous v0.15.7)
View SourceLoads skills from markdown files with YAML frontmatter.
Supports progressive disclosure: only frontmatter is parsed initially, the full markdown body is loaded on first activation.
File Format
---
name: code_review
description: Reviews code for quality and bugs
tags: [code, review]
group: review
activation: auto
allowed_tools: [read_file, grep]
priority: 100
---
You are a code review specialist...
Summary
Functions
Load all .md skill files from a directory (recursively).
Load a single skill from a markdown file.
Parse YAML frontmatter from markdown content.
Parse a skill from raw markdown content with YAML frontmatter.
Functions
@spec load_directory(String.t()) :: [Nous.Skill.t()]
Load all .md skill files from a directory (recursively).
Returns skills with only frontmatter parsed (status: :discovered).
@spec load_file(String.t()) :: {:ok, Nous.Skill.t()} | {:error, term()}
Load a single skill from a markdown file.
Parses YAML frontmatter for metadata. The markdown body is stored
but marked as status: :discovered for lazy loading.
Parse YAML frontmatter from markdown content.
Returns {:ok, metadata_map, body} or {:error, reason}.
@spec parse_skill(String.t(), String.t() | nil) :: {:ok, Nous.Skill.t()} | {:error, term()}
Parse a skill from raw markdown content with YAML frontmatter.