From 6567f99625d74f6fc6fc3a98acc7e9ceb47a268a Mon Sep 17 00:00:00 2001 From: Hrachya Shaginyan Date: Wed, 17 Jun 2026 03:28:43 +0200 Subject: [PATCH] strip UTF-8 BOM when reading SKILL.md in quick_validate (#93811) The previous `read_text(encoding="utf-8")` call left the UTF-8 byte order mark (EF BB BF, three bytes) in the content string if the file was saved by a tool that emits a BOM. The first line check (`lines[0].strip() != "---"`) then saw "\ufeff---" and rejected the file as "Invalid frontmatter format", even though the document was otherwise valid frontmatter. Co-authored-by: Zo Bot --- skills/skill-creator/scripts/quick_validate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/skill-creator/scripts/quick_validate.py b/skills/skill-creator/scripts/quick_validate.py index 612b2cac6682..2888399f35c8 100644 --- a/skills/skill-creator/scripts/quick_validate.py +++ b/skills/skill-creator/scripts/quick_validate.py @@ -73,7 +73,7 @@ def validate_skill(skill_path): return False, "SKILL.md not found" try: - content = skill_md.read_text(encoding="utf-8") + content = skill_md.read_text(encoding="utf-8-sig") except OSError as e: return False, f"Could not read SKILL.md: {e}"