Summary
The 1024-character description limit is enforced with Go's len(desc), which counts UTF-8 bytes, while the error message and the spec both speak of characters. Multibyte (CJK, emoji) descriptions are therefore rejected well below 1024 real characters.
Evidence
structure/frontmatter.go:47:
results = append(results, ctx.Errorf("description exceeds 1024 characters (%d)", len(desc)))
Real-world case from our skill tree:
- a SKILL.md description measuring 984 characters (compliant) and 1200 UTF-8 bytes (rejected)
- the skill is flagged
description exceeds 1024 characters (1200)
The spec's reference implementation enforces the same limit with Python len(), i.e. characters (skill-creator/scripts/quick_validate.py:83).
The existing test cannot catch this because its long-description fixture is ASCII (structure/frontmatter_test.go:107, strings.Repeat("x", 1025)) — bytes == chars there.
Suggested fix
results = append(results, ctx.Errorf("description exceeds 1024 characters (%d)", utf8.RuneCountInString(desc)))
plus a regression test with a CJK description, e.g. 342 CJK chars = 1026 bytes = 342 characters (must pass).
Happy to send a PR if you tell me which branch to base on.
Summary
The 1024-character description limit is enforced with Go's
len(desc), which counts UTF-8 bytes, while the error message and the spec both speak of characters. Multibyte (CJK, emoji) descriptions are therefore rejected well below 1024 real characters.Evidence
structure/frontmatter.go:47:Real-world case from our skill tree:
description exceeds 1024 characters (1200)The spec's reference implementation enforces the same limit with Python
len(), i.e. characters (skill-creator/scripts/quick_validate.py:83).The existing test cannot catch this because its long-description fixture is ASCII (
structure/frontmatter_test.go:107,strings.Repeat("x", 1025)) — bytes == chars there.Suggested fix
plus a regression test with a CJK description, e.g. 342 CJK chars = 1026 bytes = 342 characters (must pass).
Happy to send a PR if you tell me which branch to base on.