Skill Metadata Object

skill-metadata-object

info experience: data-modeling spec: frontmatter

Skill metadata should be an object.

If a skill declares metadata, it should be an object of key/value pairs.

Rule definition

The full Spotlight rule — drop it into a ruleset (.spotlight.yaml / .spectral.yaml) and run it with any Spotlight tool.

skill-metadata-object:
  title: Skill Metadata Object
  reference: https://spotlight-rules.com/spec/rules/agent-skill/skill-metadata-object/
  description: If a skill declares metadata, it should be an object of key/value pairs.
  message: Skill metadata should be an object.
  given: $.frontmatter.metadata
  severity: info
  then:
    function: schema
    functionOptions:
      schema:
        type: object
  tags:
    - format:agent-skill
    - spec:frontmatter
    - experience:data-modeling
  prompt: "You are editing an Agent Skill document to satisfy the Spotlight API
    governance rule 'skill-metadata-object' (Skill Metadata Object).
    Requirement: If a skill declares metadata, it should be an object of
    key/value pairs. To fix: Adjust the targeted value so it conforms to the
    schema this rule requires. This rule is evaluated at the JSONPath
    `$.frontmatter.metadata` — inspect every location it matches and correct
    only what violates the rule. Make the smallest change that satisfies the
    rule, leave all unrelated content, key order, comments, and formatting
    unchanged, and keep the document valid Agent Skill. Return only the complete
    corrected document, with no commentary."
AI fix prompt — send this to Claude, Gemini, or ChatGPT with your artifact to auto-fix this rule
You are editing an Agent Skill document to satisfy the Spotlight API governance rule 'skill-metadata-object' (Skill Metadata Object). Requirement: If a skill declares metadata, it should be an object of key/value pairs. To fix: Adjust the targeted value so it conforms to the schema this rule requires. This rule is evaluated at the JSONPath `$.frontmatter.metadata` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid Agent Skill. Return only the complete corrected document, with no commentary.
ArtifactAgent Skill
Applies at (given)$.frontmatter.metadata
Severityinfo — educational by default; raise to warn/error to enforce
Referencehttps://spotlight-rules.com/spec/rules/agent-skill/skill-metadata-object/