(skillRoot)
| 57 | } |
| 58 | |
| 59 | async function collectSkillSamples(skillRoot) { |
| 60 | if (!(await pathExists(skillRoot))) { |
| 61 | return []; |
| 62 | } |
| 63 | const directories = await listImmediateDirectories(skillRoot); |
| 64 | const samples = []; |
| 65 | for (const directory of directories) { |
| 66 | const skillPath = path.join(directory, "SKILL.md"); |
| 67 | if (!(await pathExists(skillPath))) { |
| 68 | continue; |
| 69 | } |
| 70 | try { |
| 71 | samples.push(await computeSkillBudget(directory)); |
| 72 | } catch { |
| 73 | // Ignore malformed shipped samples and keep the baseline usable. |
| 74 | } |
| 75 | } |
| 76 | return samples; |
| 77 | } |
| 78 | |
| 79 | async function collectPluginSamples(pluginRoot) { |
| 80 | if (!(await pathExists(pluginRoot))) { |
no test coverage detected