1 2 3 4 5 6 7 8 9 10 11 12 13 14
| export class SkillLoader { async loadFromDirectory(dir: string): Promise<Skill[]> { const files = await glob(`${dir}/**/SKILL.md`); const skills: Skill[] = []; for (const file of files) { const content = await fs.readFile(file, 'utf-8'); const skill = this.parseSkill(content); skills.push(skill); } return skills; } }
|