Yeachan-Heo/oh-my-codex · error · Error

${filePath} is missing a non-empty frontmatter "name"

Error message

${filePath} is missing a non-empty frontmatter "name"

What it means

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.

Source

Thrown at src/cli/setup.ts:2283

		if (/^\s/.test(rawLine)) continue;

		const match = line.match(/^([A-Za-z0-9_-]+):(.*)$/);
		if (!match) {
			throw new Error(
				`${filePath} has invalid YAML frontmatter on line ${index + 2}: ${trimmed}`,
			);
		}

		const [, key, rawValue] = match;
		if (!rawValue.trim()) continue;

		const parsedValue = parseSkillFrontmatterScalar(rawValue, key, filePath);
		if (key === "name") name = parsedValue;
		if (key === "description") description = parsedValue;
	}

	if (!name) {
		throw new Error(`${filePath} is missing a non-empty frontmatter "name"`);
	}
	if (!description) {
		throw new Error(
			`${filePath} is missing a non-empty frontmatter "description"`,
		);
	}

	return { name, description };
}

export async function validateSkillFile(skillMdPath: string): Promise<void> {
	const content = await readFile(skillMdPath, "utf-8");
	parseSkillFrontmatter(content, skillMdPath);
}

const INSTALLED_SKILL_BADGE_PREFIX = "[OMX] ";

/**

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Add a non-empty `name:` key to the file's frontmatter (between the `---` fences)
  2. Verify the frontmatter block starts on line 1 and is delimited by `---` lines
  3. Ensure `parseSkillFrontmatterScalar` isn't receiving an empty value (e.g. `name: ""`)

Example fix

# before
---
description: Lints code
---

# after
---
name: code-linter
description: Lints code
---
Defensive patterns

Strategy: validation

Validate before calling

function hasSkillName(src: string): boolean {
  const m = src.match(/^---\r?\n([\s\S]*?)\r?\n---/);
  if (!m) return false;
  return /^name:\s*\S+.*$/m.test(m[1]);
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27). Data as JSON: /api/errors/11da9e1114f870c1. Report an issue: GitHub.