Home/Wiki Errors/GitHub Copilot
GitHub Copilot / Encoding

frontmatter parse error with UTF-8 BOM - GitHub Copilot skill files

A skill or instruction file includes a byte order mark or malformed YAML frontmatter, so Copilot cannot parse it correctly.

Copilot skill frontmatter parse error BOMGitHub Copilot UTF-8 BOM skill filefrontmatter parse error Windows editor
Paste an error to match it against the wiki. / 粘贴报错后自动匹配。

Error text / 报错原文

  • frontmatter parse error
  • UTF-8 BOM
  • skill files saved with a UTF-8 BOM

What it means

A skill or instruction file includes a byte order mark or malformed YAML frontmatter, so Copilot cannot parse it correctly.

Most common causes

  • Windows editor saved UTF-8 with BOM
  • YAML frontmatter delimiter is malformed
  • Non-ASCII characters were saved with the wrong encoding
  • A generated file mixed CRLF and invalid bytes

Fastest fix

  • Resave the file as UTF-8 without BOM
  • Validate the frontmatter block
  • Remove invisible characters before the first ---
  • Retry with the latest Copilot CLI build

Safe fix

  • Add an editorconfig rule for charset = utf-8
  • Check generated markdown in CI
  • Keep frontmatter small and explicit
  • Avoid copying YAML from rich text sources

What not to do

  • Do not remove all instructions to hide a parse error
  • Do not save technical docs in ANSI encoding
  • Do not ignore replacement characters in generated files

How to confirm the fix

Run the smallest reproducible command first, then retry the agent task only after authentication, quota, and tool discovery are stable.

file .github/*.md
xxd -l 4 .github/copilot-instructions.md
git diff --check

Related errors

Related tools

Sources