feat: created the skill registry

This commit is contained in:
2026-06-01 11:41:04 -06:00
parent cba70d2bba
commit b9c9085617
3 changed files with 331 additions and 0 deletions
+8
View File
@@ -81,6 +81,14 @@ impl Skill {
Ok(Skill::new(name, content))
}
pub fn load(name: &str) -> Result<Self> {
let path = paths::skill_file(name);
let content = read_to_string(&path).with_context(|| {
format!("Failed to read skill '{name}' at {}", path.display())
})?;
Ok(Skill::new(name, &content))
}
pub fn list_builtin_skill_names() -> Vec<String> {
SkillsAsset::iter()
.filter_map(|v| v.strip_suffix("/SKILL.md").map(|v| v.to_string()))