Skip to content

doesn't handle non-string metadata values correctly. #40

Closed
masukomi wants to merge 2 commits intoagent-ecosystem:mainfrom
masukomi:inline_yaml_array_handling
Closed

doesn't handle non-string metadata values correctly. #40
masukomi wants to merge 2 commits intoagent-ecosystem:mainfrom
masukomi:inline_yaml_array_handling

Conversation

@masukomi
Copy link
Copy Markdown
Member

metadata is officially defined as

Arbitrary key-value mapping for additional metadata.

Thus it can be arrays, strings, number, whatever.

The processing of it was unfairly restrictive.

This PR Fixes that HOWEVER it does introduce one opinionated restriction. This would cause an error of the value of a metadata field was an empty string or null. A null or empty string value wouldn't technically be an error according to the spec but it seems like a bad practice to me.

Let me know if you want me to change this.

metadata is 'Arbitrary key-value mapping for additional metadata.'
it can be arrays, strings, number, whatever.
@masukomi masukomi force-pushed the inline_yaml_array_handling branch from 095edb5 to 3ef5316 Compare March 21, 2026 23:46
Copy link
Copy Markdown
Member

@dacharyc dacharyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate the PR, @masukomi - thanks for making the effort on something that looked like a bug fix! But I think your citation of the spec permitting "any" as a metadata field value is based on this frontmatter summary table in the spec; there's more info further down the spec about what the field should contain.

I think skill-validator is correctly enforcing this as a map[string]string, so I'm going to go ahead and close this. But I do appreciate your time and contribution.

Description string `yaml:"description"`
License string `yaml:"license"`
Compatibility string `yaml:"compatibility"`
Metadata map[string]any `yaml:"metadata"`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line you cite as rationale for this becoming any is not the complete picture. In the expanded metadata field description, the list contains this bullet:

A map from string keys to string values

So if you're encountering non-string values in the metadata field, they're correctly failing validation.

@dacharyc dacharyc closed this Mar 22, 2026
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.

2 participants