extractSpecFields
@a16njs/models / extractSpecFields
Function: extractSpecFields()
extractSpecFields(
data):AgentSkillSpecFields
Defined in: agentskills-io.ts:65
Extract the optional AgentSkills.io spec fields from parsed YAML frontmatter.
Shared by every plugin that reads a SKILL.md, so the spec key names and the
metadata coercion rule are defined exactly once.
Parameters
data
Record<string, unknown>
Frontmatter key-values as produced by gray-matter
Returns
Only the spec fields that were present and well-formed
Example
extractSpecFields({ license: 'MIT', 'allowed-tools': 'Read' })
// { license: 'MIT', allowedTools: 'Read' }