MCPcopy Index your code
hub / github.com/garrytan/gstack / buildWhenToInvokeSection

Function buildWhenToInvokeSection

scripts/gen-skill-docs.ts:381–392  ·  view source on GitHub ↗
(parts: CatalogParts)

Source from the content-addressed store, hash-verified

379
380/** Build the body section that holds the routing/voice prose. */
381export function buildWhenToInvokeSection(parts: CatalogParts): string {
382 const lines: string[] = ['## When to invoke this skill', ''];
383 if (parts.routingProse) {
384 lines.push(parts.routingProse);
385 lines.push('');
386 }
387 if (parts.voiceLine) {
388 lines.push(parts.voiceLine);
389 lines.push('');
390 }
391 return lines.join('\n');
392}
393
394/**
395 * Render a string as a YAML inline scalar value (the text after `key: `),

Callers 2

applyCatalogTrimFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected