Skip to main content
The SkillRegistry manages collections of markdown-based skills and provides search, discovery, and smart loading modes. It’s ideal for building prompt libraries that agents can draw from.

Quick Example

Markdown Skills

A markdown skill is a .md file with YAML frontmatter that provides methodology and instructions — no tools, just expertise.

Frontmatter Fields

str
required
Unique identifier for the skill.
str
Short description shown in the skill catalog.
str
default:"1.0.0"
Semantic version.
List[str]
Searchable tags for discovery.
List[str]
Tool names this skill expects to be available.
str
Skill author.
When loaded, the markdown body is wrapped in <skill name="..."> tags in the system prompt for clear delineation.

Loading Skills

From a File

From a String

From a Directory

SkillRegistry Constructor

List[MarkdownSkill]
Explicit skills to include (highest priority, overrides duplicates).
List[Path]
Custom directories to load markdown skills from.
bool
default:true
Include the 8 built-in library skills (code-review, data-analysis, debug-code, explain-concept, plan-project, summarize-document, web-research, write-report).
Loading order (last wins for duplicate names): built-in library → custom directories → explicit skills.

Methods

Eager vs. Lazy Mode

The registry can provide skills in two modes:

Eager Mode

All skill instructions are injected into the system prompt at once. Best for small collections (fewer than 15 skills) where the token overhead is acceptable.

Lazy Mode

Injects a catalog table listing all available skills, plus a read_skill(skill_name) tool. The model loads skills on demand. Best for large collections (15+ skills) to avoid bloating the prompt.

Auto Mode

When using skill_registry= on the Agent, the mode is chosen automatically:

Built-in Library Skills