{"record":{"id":"11da9e1114f870c1","repo":"Yeachan-Heo/oh-my-codex","slug":"filepath-is-missing-a-non-empty-frontmatter-na","errorCode":null,"errorMessage":"${filePath} is missing a non-empty frontmatter \"name\"","messagePattern":"(.+?) is missing a non-empty frontmatter \"name\"","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/cli/setup.ts","lineNumber":2283,"sourceCode":"\t\tif (/^\\s/.test(rawLine)) continue;\n\n\t\tconst match = line.match(/^([A-Za-z0-9_-]+):(.*)$/);\n\t\tif (!match) {\n\t\t\tthrow new Error(\n\t\t\t\t`${filePath} has invalid YAML frontmatter on line ${index + 2}: ${trimmed}`,\n\t\t\t);\n\t\t}\n\n\t\tconst [, key, rawValue] = match;\n\t\tif (!rawValue.trim()) continue;\n\n\t\tconst parsedValue = parseSkillFrontmatterScalar(rawValue, key, filePath);\n\t\tif (key === \"name\") name = parsedValue;\n\t\tif (key === \"description\") description = parsedValue;\n\t}\n\n\tif (!name) {\n\t\tthrow new Error(`${filePath} is missing a non-empty frontmatter \"name\"`);\n\t}\n\tif (!description) {\n\t\tthrow new Error(\n\t\t\t`${filePath} is missing a non-empty frontmatter \"description\"`,\n\t\t);\n\t}\n\n\treturn { name, description };\n}\n\nexport async function validateSkillFile(skillMdPath: string): Promise<void> {\n\tconst content = await readFile(skillMdPath, \"utf-8\");\n\tparseSkillFrontmatter(content, skillMdPath);\n}\n\nconst INSTALLED_SKILL_BADGE_PREFIX = \"[OMX] \";\n\n/**","sourceCodeStart":2265,"sourceCodeEnd":2301,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/setup.ts#L2265-L2301","documentation":"Thrown while parsing a skill file's YAML frontmatter: the required `name` field is absent or empty. The setup loader validates every skill file has both `name` and `description` frontmatter before installing it.","triggerScenarios":"Calling the skill loader with a .md skill file whose frontmatter omits `name:`, has `name:` with no value, or has only whitespace after the colon.","commonSituations":"Hand-authored skill markdown files, copy-pasted templates missing the header, or a frontmatter delimiter typo that makes the parser see no fields at all.","solutions":["Add a non-empty `name:` key to the file's frontmatter (between the `---` fences)","Verify the frontmatter block starts on line 1 and is delimited by `---` lines","Ensure `parseSkillFrontmatterScalar` isn't receiving an empty value (e.g. `name: \"\"`)"],"exampleFix":"# before\n---\ndescription: Lints code\n---\n\n# after\n---\nname: code-linter\ndescription: Lints code\n---","handlingStrategy":"validation","validationCode":"function hasSkillName(src: string): boolean {\n  const m = src.match(/^---\\r?\\n([\\s\\S]*?)\\r?\\n---/);\n  if (!m) return false;\n  return /^name:\\s*\\S+.*$/m.test(m[1]);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate skill files with a frontmatter linter before installing","Use a shared skill template that includes name and description"],"tags":["yaml","frontmatter","skill","validation"],"backgroundTag":"missing-required-frontmatter-field","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}