MCPcopy Create free account
hub / github.com/github/gh-aw / extractFrontmatterSkillReferences

Function extractFrontmatterSkillReferences

pkg/workflow/workflow_builder.go:219–233  ·  view source on GitHub ↗
(parsedFrontmatter *FrontmatterConfig, frontmatter map[string]any)

Source from the content-addressed store, hash-verified

217}
218
219func extractFrontmatterSkillReferences(parsedFrontmatter *FrontmatterConfig, frontmatter map[string]any) []SkillReference {
220 if parsedFrontmatter != nil && len(parsedFrontmatter.SkillReferences) > 0 {
221 return append([]SkillReference(nil), parsedFrontmatter.SkillReferences...)
222 }
223
224 // Fall back to raw frontmatter when ParseFrontmatterConfig failed for non-skills reasons
225 // (e.g. unrecognized tool shapes). Safe because validateFrontmatterSkills already ran
226 // and succeeded on this frontmatter before we reach this point.
227 rawSkills, ok := frontmatter["skills"].([]any)
228 if !ok || len(rawSkills) == 0 {
229 return nil
230 }
231
232 return parseRawSkillReferences(rawSkills)
233}
234
235func extractMainModelCostsOverlay(toolsResult *toolsProcessingResult, frontmatter map[string]any) map[string]any {
236 // Fall back to raw frontmatter when ParseFrontmatterConfig failed (e.g. due to unrecognized

Callers 2

extractFrontmatterSkillsFunction · 0.85

Calls 1

parseRawSkillReferencesFunction · 0.85

Tested by

no test coverage detected