[BUG] Skill frontmatter parser fails on Prettier-formatted multi-line descriptions

Resolved 💬 8 comments Opened Nov 9, 2025 by sesyilmaz Closed Feb 10, 2026

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?

When creating skills with long descriptions, code formatters like Prettier automatically wrap YAML frontmatter descriptions across multiple lines without adding YAML multi-line operators (| or >). This causes Claude Code to fail parsing the skill frontmatter, making the skill undiscoverable.

In projects with pre-commit hooks that enforce Prettier formatting, skills become invisible to Claude after the formatter runs.

What Should Happen?

Claude Code should parse multi-line YAML descriptions even without explicit operators.

Error Messages/Logs

No explicit error is shown. The skill simply doesn't appear when asking "What skills do you have?" in a new Claude session.

Steps to Reproduce

  1. Create a skill file .claude/skills/example-skill/SKILL.md:
---
name: example-skill
description: This is a very long description that exceeds typical line length limits and will be automatically wrapped by code formatters like Prettier when configured with line length restrictions commonly used in projects.
---

# Example Skill
Instructions here...
  1. Start a new Claude Code session
  2. Ask "_What skills do you have?_" ⭢ The skill IS listed and discoverable
  3. Run Prettier on the file (with line length limit configured, e.g., 120 characters)
  4. Prettier reformats the frontmatter to:
---
name: example-skill
description:
  This is a very long description that exceeds typical line length limits and will be
  automatically wrapped by code formatters like Prettier when configured with line length
  restrictions commonly used in corporate projects.
---

# Example Skill
Instructions here...
  1. Start a new Claude Code session
  2. Ask "_What skills do you have?_" ⭢ The skill is NOT listed
  3. Manually fix by adding | operator:
---
name: example-skill
description: |
  This is a very long description that exceeds typical line length limits and will be
  automatically wrapped by code formatters like Prettier when configured with line length
  restrictions commonly used in corporate projects.
---

# Example Skill
Instructions here...
  1. Start a new Claude Code session
  2. Ask "_What skills do you have?_" ⭢ The skill IS listed back again

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.0.8 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗