Skip to content

SKILL.md YAML block scalar description not parsed correctly #1907

@zlh124

Description

@zlh124

Description

When a SKILL.md frontmatter description field uses YAML block scalar syntax (> folded or | literal), the parser stores the indicator character (e.g. >) as the description value and ignores the indented content entirely.

For example:

description: >
  This is a multi-line
  skill description

The parsed description becomes ">" instead of "This is a multi-line skill description".

Steps to reproduce

  1. Create a SKILL.md with a block-scalar description:

    ---
    name: test-skill
    description: >
      line one
      line two
    ---
    This is the skill body
  2. Run /skills in DeepSeek TUI to list loaded skills, or load the skill via load_skill

  3. Observe the description displayed for this skill — it shows > instead of the actual text

Alternatively, call SkillRegistry::parse_skill directly in a unit test to reproduce.

Expected behavior

  • > (folded): content lines joined with spaces → "line one line two"
  • | (literal): content lines joined with newlines → "line one\nline two"
  • >- / |- (strip chomp): trailing blank lines removed
  • >+ / |+ (keep chomp): trailing blank lines preserved
  • Single-line descriptions (non-block-scalar): unchanged backward compat

Actual behavior

Block scalar continuation lines are completely ignored. The description field is set to the raw indicator string (e.g. ">").

Impact

Skills authored with multi-line descriptions (using YAML block scalars) show incorrect description text in /skills, load_skill tool output, and the system prompt's skills context block.

Fix

A fix has been committed to feat/skill-yaml-block-scalar branch (fork at zlh124/DeepSeek-TUI). It implements proper YAML block scalar parsing with indentation-based block collection, chomping (strip/clip/keep), folding (space-join) and literal (newline-join) modes, plus 13 unit tests covering all variants.

Environment

  • DeepSeek CLI version: 0.8.40

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    Status

    In progress

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions