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

Function walk

test/skill-validation.test.ts:1596–1607  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

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 }

Callers 1

discoverSkillSurfaceFunction · 0.70

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected