{"record":{"id":"aa3c33ea92d359e9","repo":"Tencent/WeKnora","slug":"skill-validation-failed-w","errorCode":null,"errorMessage":"skill validation failed: %w","messagePattern":"skill validation failed: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/agent/skills/skill.go","lineNumber":222,"sourceCode":"\n\t// Parse YAML frontmatter\n\tfrontmatter := strings.Join(frontmatterLines, \"\\n\")\n\trepaired, err := UnmarshalSkillFrontmatter(frontmatter, skill)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse YAML frontmatter: %w\", err)\n\t}\n\tskill.FrontmatterRepaired = repaired\n\tif err := skill.applyInstallName(); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Set body instructions\n\tskill.Instructions = strings.TrimSpace(strings.Join(bodyLines, \"\\n\"))\n\tskill.Loaded = true\n\n\t// Validate\n\tif err := skill.Validate(); err != nil {\n\t\treturn nil, fmt.Errorf(\"skill validation failed: %w\", err)\n\t}\n\n\treturn skill, nil\n}\n\n// ParseSkillMetadata parses only the metadata from a SKILL.md file content\n// This is a lightweight operation for skill discovery (Level 1 only)\nfunc ParseSkillMetadata(content string) (*SkillMetadata, error) {\n\tskill, err := ParseSkillFile(content)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn skill.ToMetadata(), nil\n}\n\n// IsOnDemandInstallerPath reports whether path is a first-use dependency\n// installer (scripts/install_deps.py and friends). Skills ship these to defer\n// optional packages to chat time, which cannot work once the skill tree is","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/agent/skills/skill.go#L204-L240","documentation":"Validation wrapper in ParseSkillFile: the YAML parsed successfully but Skill.Validate rejected the skill (empty/reserved/oversized name, bad name characters, XML tags in name, empty or oversized description, etc.). The SKILL.md structure is fine; its metadata violates the skill specification.","triggerScenarios":"Thrown at internal/agent/skills/skill.go:222 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the wrapped Validate error to see which rule failed","Fix the offending frontmatter field (name characters, reserved words, description length)","Re-run ParseSkillFile to confirm the skill now validates"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"988cbb03305e055d8ebb7d46d9ac6cc0803cd074","analyzedAt":"2026-09-02T14:41:08.344Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}