MCPcopy
hub / github.com/garrytan/gstack / findInteractiveSkills

Function findInteractiveSkills

test/e2e-harness-audit.test.ts:64–79  ·  view source on GitHub ↗

* Load .tmpl files for each skill and return the names of those that have * `interactive: true` in frontmatter.

()

Source from the content-addressed store, hash-verified

62 * `interactive: true` in frontmatter.
63 */
64function findInteractiveSkills(): string[] {
65 const interactive: string[] = [];
66 for (const skill of SKILL_GLOBS) {
67 const tmplPath = path.join(ROOT, skill, 'SKILL.md.tmpl');
68 if (!fs.existsSync(tmplPath)) continue;
69 const content = fs.readFileSync(tmplPath, 'utf-8');
70 // Frontmatter lives between the first '---' and the next '---'.
71 const fmEnd = content.indexOf('\n---', 4);
72 if (fmEnd < 0) continue;
73 const frontmatter = content.slice(0, fmEnd);
74 if (/^interactive:\s*true\s*$/m.test(frontmatter)) {
75 interactive.push(skill);
76 }
77 }
78 return interactive;
79}
80
81/**
82 * Scan a test file's contents for any of the supported real-interactive

Callers 1

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected