Skip to content

[BUG] Skill multiline YAML descriptions are truncated to block indicators #15947

Closed

Description

@saynoword

Describe the bug

Skill frontmatter parsing does not handle YAML block scalars correctly. A multiline description: | is normalized to the literal string | in Skill metadata, and a colon in the description can create a spurious nested field such as description.Triggers.

This affects the descriptions returned by Skill list and metadata-detail APIs after creation/upload.

Expected behavior

The description contains the complete parsed text, with YAML literal/folded line-break semantics. Description text such as Triggers: ... remains part of the description and does not become a frontmatter key.

Actually behavior

The returned metadata can contain:

{
  "description": "|",
  "frontMatter": {
    "name": "alibabacloud-rds-copilot",
    "description": "|",
    "version": "0.0.1",
    "description.Triggers": "RDS Copilot, SQL optimization"
  }
}

How to Reproduce

  1. Upload a Skill ZIP, or create a Skill draft, with this SKILL.md:
---
version: 0.0.1
name: alibabacloud-rds-copilot
description: |
  Alibaba Cloud RDS Copilot intelligent operations assistant skill.
  Calls RdsAi OpenAPI through Alibaba Cloud CLI.
  Triggers: RDS Copilot, SQL optimization
---
Use RDS Copilot to diagnose database issues.
  1. Query GET /v3/admin/ai/skills/list and GET /v3/admin/ai/skills?skillName=alibabacloud-rds-copilot.
  2. Inspect description and frontMatter.

Desktop (please complete the following information):

  • Version: development code, 3.3.0-RC.
  • Module: ai (Skill upload, draft normalization, metadata).
  • Local regression test environment: macOS ARM64, JDK 17.
  • SDK: not required; this is a server-side path.

Additional context

There are two hand-written parsers: SkillZipParser.parseYamlFrontMatter joins indented lines and interprets colons as nested keys, while SkillRequestUtil.parseFrontmatterField reads only the field's first line. The normalization path therefore overwrites the description with |.

Focused tests reproduce the failure for literal and folded scalars, chomping indicators, paragraphs, indented text, and creation/upload followed by list/detail reads. The intended fix is to use the existing SnakeYAML dependency for block scalars and share the parsed result during normalization, while retaining the current representation of other frontmatter fields.

Already persisted incorrect metadata requires a content update or re-upload to refresh; querying metadata alone does not reparse stored packages.

Activity

  1. added a commit that references this issue on Oct 27, 2026
    1e6d4dd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/Skillkind/bugCategory issues or prs related to bug.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions