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