garrytan/gstack · error · Error
SKILL.md validation failed: ${errors.join('; ')}
Error message
SKILL.md validation failed: ${errors.join('; ')} What it means
Error "SKILL.md validation failed: ${errors.join('; ')}" thrown in garrytan/gstack.
Source
Thrown at browse/src/browser-skills.ts:151
if (!content.startsWith('---\n')) {
throw new Error('SKILL.md missing frontmatter block (expected starting "---\\n")');
}
const fmEnd = content.indexOf('\n---', 4);
if (fmEnd === -1) {
throw new Error('SKILL.md frontmatter block not terminated (expected "\\n---")');
}
const fmText = content.slice(4, fmEnd);
const bodyMd = content.slice(fmEnd + 4).replace(/^\n+/, '');
const fm = parseFrontmatterFields(fmText);
// Validate required fields.
const errors: string[] = [];
const name = fm.name ?? opts.skillName ?? '';
if (!name) errors.push('missing required field: name (or skillName hint)');
if (!fm.host) errors.push('missing required field: host');
// triggers and args may be omitted — empty list is valid.
if (errors.length > 0) {
throw new Error(`SKILL.md validation failed: ${errors.join('; ')}`);
}
const frontmatter: SkillFrontmatter = {
name,
description: fm.description,
host: fm.host as string,
triggers: Array.isArray(fm.triggers) ? fm.triggers : [],
args: Array.isArray(fm.args) ? fm.args : [],
trusted: fm.trusted === true,
version: typeof fm.version === 'string' ? fm.version : undefined,
source: fm.source === 'agent' || fm.source === 'human' ? fm.source : undefined,
};
return { frontmatter, bodyMd };
}
interface RawFrontmatter {
name?: string;View on GitHub (pinned to 94993f7401)
When it happens
Trigger: Thrown at browse/src/browser-skills.ts:151 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of garrytan/gstack@94993f7401 (2026-08-12).
Data as JSON: /api/errors/aabdb90e2e6e59f6.
Report an issue: GitHub.