Nous.Skill.Loader (nous v0.15.6)

View Source

Loads 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

load_directory(path)

@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).

load_file(path)

@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_frontmatter(content)

@spec parse_frontmatter(String.t()) :: {:ok, map(), String.t()} | {:error, term()}

Parse YAML frontmatter from markdown content.

Returns {:ok, metadata_map, body} or {:error, reason}.

parse_skill(content, source_path \\ nil)

@spec parse_skill(String.t(), String.t() | nil) ::
  {:ok, Nous.Skill.t()} | {:error, term()}

Parse a skill from raw markdown content with YAML frontmatter.