[BUG] Claude misinterprets skill "description" field using block scalar style
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
If you create a skill in a SKILL.md file under a ~/.claude/skills/
Compare these two SKILL.md files:
- Flow Style Scalar
---
name: My Skill
description: "Use when ..."
---
# My Skill
...
- Block Style Scalar
---
name: My Skill
description: |
Use when ...
---
# My Skill
...
For the latter SKILL.md file, Claude's "available_skills" field for its Skill tool has a "description" element as follows:
<description>
| (project, gitignored)
</description>
That shows that Claude is failing to parse the Markdown frontmatter as YAML properly.
What Should Happen?
Claude should parse the Markdown frontmatter as a YAML document with a full-featured parser that understands the block scalar style.
Error Messages/Logs
Steps to Reproduce
- Create a directory named ~/.claude/skills/my-skill, and within write a file named SKILL.md with the following content:
---
name: My Skill
description: |
Use when ...
---
# My Skill
...
- Start the claude program, and probe it for which skills it knows. Ask it to divulge the Skill tool's "available_skills" list.
- Inspect the "description" element in the XML document, and note that it lacks the YAML "description" field's intended value, and instead just contains the YAML literal style indicator (
|).
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
No response
Claude Code Version
2.0.22 (Claude Code)
Platform
Google Vertex AI
Operating System
macOS
Terminal/Shell
Other
Additional Information
Issue #9928 may be related, at least in the reported symptoms.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
I haven't seen any recent changes that would alleviate this problem.