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
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
Include the 8 built-in library skills (code-review, data-analysis, debug-code, explain-concept, plan-project, summarize-document, web-research, write-report).
Methods
Eager vs. Lazy Mode
The registry can provide skills in two modes:Eager Mode
Lazy Mode
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 usingskill_registry= on the Agent, the mode is chosen automatically: