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

Function readSkillUnion

test/skill-validation.test.ts:14–23  ·  view source on GitHub ↗
(skill: string)

Source from the content-addressed store, hash-verified

12// section still hold. For an uncarved skill (no sections dir) this is just the
13// skeleton, so readSkillUnion is safe to use everywhere.
14function readSkillUnion(skill: string): string {
15 let t = fs.readFileSync(path.join(ROOT, skill, 'SKILL.md'), 'utf-8');
16 const secDir = path.join(ROOT, skill, 'sections');
17 if (fs.existsSync(secDir)) {
18 for (const f of fs.readdirSync(secDir).sort()) {
19 if (f.endsWith('.md')) t += '\n' + fs.readFileSync(path.join(secDir, f), 'utf-8');
20 }
21 }
22 return t;
23}
24function readShipUnion(): string {
25 return readSkillUnion('ship');
26}

Callers 2

readShipUnionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected