Skip to content

Preserve nested OKF fields under SKILL.md metadata #894

Closed

Description

@salmonumbrella

What problem does this solve?

A SKILL.md can carry Open Knowledge Format fields only under metadata. That is the slot the Agent Skills spec leaves for extra data, so Claude still loads the skill from name and description and does not skip the file. The names are the OKF names. They are not prefixed.

metadata:
  type: Skill
  status: stable
  generated:
    by: human:alex
    at: "2026-11-13T00:00:00Z"
  sources:
    - id: agentskills
      resource: https://agentskills.io/specification

internal/utils/frontmatter.go ParseFrontmatterFields keeps only scalar values. A nested metadata map is dropped. A later reader cannot see type, status, generated, or sources. Putting those keys at the top level is the wrong fix. skills-ref rejects any top-level key outside name, description, license, compatibility, metadata, and allowed-tools, and Claude's discovery only needs the first two.

skills-ref also stringifies a nested mapping, so a green validate is not evidence generated.by survived. Skillshare should keep the mapping.

Desired outcome

Parsing a SKILL.md preserves metadata as a mapping, including nested generated and a sources list. The skill still syncs, lists, and audits. Unknown metadata keys do not fail discovery and do not change name or description.

metadata.type is not the hub index type field. Do not overwrite one with the other.

A skill with no metadata block behaves as it does today.

Surface impact

  • Parser (ParseFrontmatterFields and any caller that reads SKILL.md frontmatter)
  • list, hub index, and audit, if they surface frontmatter metadata

Implementation ideas

Return the raw metadata value from the YAML parse instead of dropping non-scalars. Do not stringify generated. Do not require the OKF keys. A vault that still stores only metadata.last_edited keeps working.

Activity

  1. salmonumbrella commented on Nov 14, 2026

    @salmonumbrella
    ContributorAuthor

    The current complete-map parser already preserves nested mappings and lists, and package loading uses it. #901 keeps the scalar projection intact and fixes the legacy readers that can mistake nested fields for root fields. It includes structured-preservation and namespace regressions, global/project CLI coverage, and format documentation. The PR is in draft while review and CI finish.

  2. added a commit that references this issue on Nov 14, 2026
    990732b
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions