Skip to content

Fix skill frontmatter parsing when description contains a colon#2401

Merged
dgageot merged 1 commit intodocker:mainfrom
dgageot:board/fix-docker-agent-issue-2393endtml-36255625
Apr 13, 2026
Merged

Fix skill frontmatter parsing when description contains a colon#2401
dgageot merged 1 commit intodocker:mainfrom
dgageot:board/fix-docker-agent-issue-2393endtml-36255625

Conversation

@dgageot
Copy link
Copy Markdown
Member

@dgageot dgageot commented Apr 13, 2026

Summary

Replace the YAML parser in parseFrontmatter with simple line-by-line parsing that splits on the first : . The YAML parser rejected unquoted colons in values (e.g. Usage: run this), which caused skills with such descriptions to silently fail to load.

Changes

  • pkg/skills/skills.go: Replace yaml.Unmarshal with a line-by-line parser that handles colons in values naturally. Remove the unused stringOrList type, UnmarshalYAML method, yaml struct tags, and go-yaml import.
  • pkg/skills/skills_test.go: Add test cases for colons in descriptions and quoted allowed-tools list items.

Fixes #2393

Replace the YAML parser in parseFrontmatter with simple line-by-line
parsing that splits on the first ": ". The YAML parser rejected
unquoted colons in values (e.g. "Usage: run this"), which caused
skills with such descriptions to silently fail to load.

Also simplify the Skill struct by removing unused yaml struct tags
and the dead stringOrList type, since YAML unmarshaling is no longer
used for local skill frontmatter.

Fixes docker#2393

Assisted-By: docker-agent
@dgageot dgageot requested a review from a team as a code owner April 13, 2026 13:07
@dgageot dgageot merged commit 5cdb6dd into docker:main Apr 13, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skill is not detected/loaded if there is a : in the description field value of the skill header

2 participants