{"record":{"id":"07ed25f994a08687","repo":"Tencent/WeKnora","slug":"error-reading-skill-md-w","errorCode":null,"errorMessage":"error reading SKILL.md: %w","messagePattern":"error reading SKILL\\.md: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/agent/skills/skill.go","lineNumber":198,"sourceCode":"\t\t\tinFrontmatter = true\n\t\t\tcontinue\n\t\t}\n\n\t\tif inFrontmatter && strings.TrimSpace(line) == \"---\" {\n\t\t\tinFrontmatter = false\n\t\t\tfrontmatterEnded = true\n\t\t\tcontinue\n\t\t}\n\n\t\tif inFrontmatter {\n\t\t\tfrontmatterLines = append(frontmatterLines, line)\n\t\t} else if frontmatterEnded {\n\t\t\tbodyLines = append(bodyLines, line)\n\t\t}\n\t}\n\n\tif err := scanner.Err(); err != nil {\n\t\treturn nil, fmt.Errorf(\"error reading SKILL.md: %w\", err)\n\t}\n\n\tif !frontmatterEnded {\n\t\treturn nil, errors.New(\"SKILL.md frontmatter is not properly closed with ---\")\n\t}\n\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","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/agent/skills/skill.go#L180-L216","documentation":"I/O wrapper in ParseSkillFile: bufio.Scanner.Err() was non-nil after scanning the SKILL.md content, meaning reading the input stream itself failed (I/O error), as opposed to a formatting problem. Content-format issues are reported by later checks like the unclosed-frontmatter error.","triggerScenarios":"Thrown at internal/agent/skills/skill.go:198 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry reading the SKILL.md source; check for transient I/O failures","Verify the SKILL.md file is readable and not truncated/corrupted","Check encoding issues (invalid UTF-8 can fail the scanner) and re-save as UTF-8"],"exampleFix":null,"handlingStrategy":"try-catch","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"}