Scan skills/ dir, populate SKILL_REGISTRY with name/description/content.
()
| 67 | SKILL_REGISTRY: dict[str, dict] = {} |
| 68 | |
| 69 | def _scan_skills(): |
| 70 | """Scan skills/ dir, populate SKILL_REGISTRY with name/description/content.""" |
| 71 | if not SKILLS_DIR.exists(): |
| 72 | return |
| 73 | for d in sorted(SKILLS_DIR.iterdir()): |
| 74 | if not d.is_dir(): |
| 75 | continue |
| 76 | manifest = d / "SKILL.md" |
| 77 | if manifest.exists(): |
| 78 | raw = manifest.read_text() |
| 79 | meta, body = _parse_frontmatter(raw) |
| 80 | name = meta.get("name", d.name) |
| 81 | desc = meta.get("description", raw.split("\n")[0].lstrip("#").strip()) |
| 82 | SKILL_REGISTRY[name] = {"name": name, "description": desc, "content": raw} |
| 83 | |
| 84 | _scan_skills() |
| 85 |
no test coverage detected