Skip to content

fix(skill-creator, mcp-builder): specify utf-8 file encoding and pin mcp<2 - #1690

Open
AbhiPra24 wants to merge 1 commit into
anthropics:mainfrom
AbhiPra24:fix/windows-encoding-and-mcp-pin
Open

fix(skill-creator, mcp-builder): specify utf-8 file encoding and pin mcp<2#1690
AbhiPra24 wants to merge 1 commit into
anthropics:mainfrom
AbhiPra24:fix/windows-encoding-and-mcp-pin

Conversation

@AbhiPra24

Copy link
Copy Markdown

Summary

Changes

  • skills/skill-creator/scripts/aggregate_benchmark.py: specify encoding="utf-8" in open() calls.
  • skills/skill-creator/scripts/generate_report.py: specify encoding="utf-8" in read_text() and write_text() calls.
  • skills/skill-creator/scripts/improve_description.py: specify encoding="utf-8" in read_text() and write_text() calls.
  • skills/skill-creator/scripts/quick_validate.py: specify encoding="utf-8" in read_text().
  • skills/skill-creator/scripts/run_eval.py: specify encoding="utf-8" in read_text() and write_text() calls.
  • skills/skill-creator/scripts/run_loop.py: specify encoding="utf-8" in read_text() and write_text() calls.
  • skills/skill-creator/scripts/utils.py: specify encoding="utf-8" in read_text().
  • skills/skill-creator/eval-viewer/generate_review.py: specify encoding="utf-8" across all read_text() and write_text() calls.
  • skills/mcp-builder/scripts/evaluation.py: specify encoding="utf-8" in write_text().
  • skills/mcp-builder/scripts/requirements.txt: pin mcp>=1.1.0,<2.

Testing

  • Verified with python3 skills/skill-creator/scripts/quick_validate.py skills/mcp-builder
  • Verified with python3 skills/skill-creator/scripts/quick_validate.py skills/skill-creator

cc @98zc5g5jyw-arch for review

…and pin mcp<2

- Add explicit encoding="utf-8" across skill-creator scripts, eval-viewer, and mcp-builder evaluation harness to prevent Windows cp1252 decode errors (anthropics#1686, anthropics#1669)
- Pin mcp<2 in mcp-builder/scripts/requirements.txt to prevent breaking changes with streamablehttp_client (anthropics#1668)
cultosagent added a commit to cultosagent/dogma-registry that referenced this pull request Aug 31, 2026

@Hahaknight Hahaknight left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the encoding choice on real Windows 11 against a production Chinese-language SKILL.md — one substantive gap plus a scope note:

1. Plain utf-8 misses the BOM case documented in #1686 (reporter found a real BOM'd SKILL.md in the wild). Prepending a UTF-8 BOM (EF BB BF) to a valid skill:

  • read_text(encoding="utf-8") (this PR) → content starts with , so startswith('---') / lines[0].strip() != '---' checks return False → a valid skill is silently rejected as "no frontmatter". No crash, so it fails quietly — arguably worse than the current loud crash.
  • read_text(encoding="utf-8-sig") → passes, and is byte-identical to utf-8 on non-BOM files (no downside).

Suggest using utf-8-sig for the SKILL.md read sites (quick_validate.py, utils.py:parse_skill_md) to match #1687's approach and the reporter's recommendation. For JSON/HTML artifact reads/writes in eval-viewer/mcp-builder, plain utf-8 is fine.

2. Scope: the mcp>=1.1.0,<2 pin in mcp-builder/requirements.txt looks unrelated to the Windows encoding fix — might be worth splitting into its own PR so the maintainers can evaluate each independently.

The eval-viewer and mcp-builder read/write sites this PR fixes are not covered by #1687, so the coverage between the two PRs is complementary — merging both (with utf-8-sig at the SKILL.md sites) would close #1686 fully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants