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

Function skeleton

test/skill-validation.test.ts:180–187  ·  view source on GitHub ↗
(usage: string)

Source from the content-addressed store, hash-verified

178 // This catches format mismatches (e.g., <name>:<value> vs <name> <value>)
179 // without tripping on abbreviation differences (e.g., <sel> vs <selector>).
180 function skeleton(usage: string): string {
181 return usage
182 .replace(/\(.*?\)/g, '') // strip parenthetical hints like (e.g., Enter, Tab)
183 .replace(/<[^>]*>/g, '<>') // normalize <param-name> → <>
184 .replace(/\[[^\]]*\]/g, '[]') // normalize [optional] → []
185 .replace(/\s+/g, ' ') // collapse whitespace
186 .trim();
187 }
188
189 // Cross-check Usage: patterns in implementation against COMMAND_DESCRIPTIONS
190 test('implementation Usage: structural format matches COMMAND_DESCRIPTIONS', () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected