MCPcopy Create free account
hub / github.com/garrytan/gstack / discoverSkillSurface

Function discoverSkillSurface

test/skill-validation.test.ts:1594–1610  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1592 // Walk every SKILL.md and SKILL.md.tmpl in the repo (excluding node_modules,
1593 // generated host outputs, and .git).
1594 function discoverSkillSurface(): string[] {
1595 const results: string[] = [];
1596 function walk(dir: string) {
1597 for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
1598 if (entry.name.startsWith('.') && entry.name !== '.agents') continue;
1599 if (entry.name === 'node_modules' || entry.name === 'dist') continue;
1600 const full = path.join(dir, entry.name);
1601 if (entry.isDirectory()) {
1602 walk(full);
1603 } else if (entry.name === 'SKILL.md' || entry.name === 'SKILL.md.tmpl') {
1604 results.push(full);
1605 }
1606 }
1607 }
1608 walk(ROOT);
1609 return results;
1610 }
1611
1612 test('no SKILL.md or SKILL.md.tmpl references private maintainer files', () => {
1613 const files = discoverSkillSurface();

Callers 1

Calls 1

walkFunction · 0.70

Tested by

no test coverage detected