Problem
quick_validate.py does not check if the description field in SKILL.md frontmatter is properly quoted when it contains special YAML characters like :, ,, [, ].
This leads to silent failures: skills don't load, but there's no error message.
Example
# ❌ Fails silently - YAML sees two keys
description: Use when: gmail, inbox
# ✅ Works correctly - single string value
description: "Use when: gmail, inbox"
Current behavior
The validator uses yaml.safe_load() which:
- Parses the YAML successfully if it happens to be valid (even if unintended)
- Throws a parse error only in some cases
- Never warns that quotes are missing
Suggested improvement
Add a check in quick_validate.py that warns when:
- Description contains
: (common in "Use when:" patterns)
- Description is not quoted in the source file
This could be done by checking the raw frontmatter text before YAML parsing:
# Check if description line contains ':' but isn't quoted
desc_match = re.search(r'^description:\s*(["\']?)(.+?)\1\s*$', frontmatter_text, re.MULTILINE)
if desc_match:
quote_char = desc_match.group(1)
desc_value = desc_match.group(2)
if ':' in desc_value and not quote_char:
return False, "Description contains ':' but is not quoted. Wrap in quotes to avoid YAML parsing issues."
Related
This issue has caused confusion for users building skills, as documented in claude-code#16916.
Problem
quick_validate.pydoes not check if thedescriptionfield in SKILL.md frontmatter is properly quoted when it contains special YAML characters like:,,,[,].This leads to silent failures: skills don't load, but there's no error message.
Example
Current behavior
The validator uses
yaml.safe_load()which:Suggested improvement
Add a check in
quick_validate.pythat warns when::(common in "Use when:" patterns)This could be done by checking the raw frontmatter text before YAML parsing:
Related
This issue has caused confusion for users building skills, as documented in claude-code#16916.