You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Skills with a UTF-8 BOM lose their frontmatter metadata #4532
A SKILL.md file saved as UTF-8 with a byte order mark (BOM) is discovered as a skill, but its YAML frontmatter is not parsed. The skill's frontmatter becomes empty and its description becomes the literal opening delimiter ("\ufeff---") instead of the configured description.
YAML 1.2 permits a BOM at the beginning of a character stream, and UTF-8-with-BOM files are still produced by some editors, particularly on Windows.
Example Code
frompathlibimportPathfromtempfileimportTemporaryDirectoryfromfastmcp.server.providers.skillsimportSkillProviderwithTemporaryDirectory() astemp_dir:
skill_dir=Path(temp_dir) /"bom-skill"skill_dir.mkdir()
(skill_dir/"SKILL.md").write_text(
"\ufeff---\n""name: bom-skill\n""description: Skill saved with a UTF-8 BOM\n""---\n""# BOM Skill\n",
encoding="utf-8",
)
provider=SkillProvider(skill_dir)
print(provider.skill_info.description)
print(provider.skill_info.frontmatter)
Actual output:
---
{}
Expected output:
Skill saved with a UTF-8 BOM
{'name': 'bom-skill', 'description': 'Skill saved with a UTF-8 BOM'}
Version Information
FastMCP: main at 66c0270
Python: 3.12.12
Platform: macOS arm64
I reproduced this in SkillProvider. Python's UTF-8 decoder correctly preserves a leading BOM, but parse_frontmatter() checks for --- at index zero, so it misses the otherwise valid metadata and treats \ufeff--- as the skill description.
I'd like to submit a small PR that removes one leading BOM at the parser boundary before delimiter detection and adds provider-level regression coverage. This would leave file decoding and the served SKILL.md resource unchanged.
I'd like to take this — PR already up at #4563 (strips UTF-8 BOM in parse_frontmatter + unit test). Please assign me so the PR assignment gate can reopen it.
Activity
hxaxd commentedon Jul 18, 2026
I reproduced this in
SkillProvider. Python's UTF-8 decoder correctly preserves a leading BOM, butparse_frontmatter()checks for---at index zero, so it misses the otherwise valid metadata and treats\ufeff---as the skill description.I'd like to submit a small PR that removes one leading BOM at the parser boundary before delimiter detection and adds provider-level regression coverage. This would leave file decoding and the served
SKILL.mdresource unchanged.Would you be open to a PR with this approach?
Solaris-star commentedon Jul 20, 2026
I'd like to take this — PR already up at #4563 (strips UTF-8 BOM in
parse_frontmatter+ unit test). Please assign me so the PR assignment gate can reopen it.