{"record":{"id":"f5e6ddb3890ab3b7","repo":"Tencent/WeKnora","slug":"skill-not-found-s","errorCode":null,"errorMessage":"skill not found: %s","messagePattern":"skill not found: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/agent/skills/loader.go","lineNumber":125,"sourceCode":"// Returns the cached skill if already loaded\nfunc (l *Loader) LoadSkillInstructions(skillName string) (*Skill, error) {\n\t// Check cache first\n\tif skill, ok := l.discoveredSkills[skillName]; ok {\n\t\tif skill.Loaded {\n\t\t\treturn skill, nil\n\t\t}\n\t}\n\n\t// Search for the skill in all directories\n\tfor _, dir := range l.skillDirs {\n\t\tskill, err := l.loadSkillFromDirectory(dir, skillName)\n\t\tif err == nil {\n\t\t\tl.discoveredSkills[skillName] = skill\n\t\t\treturn skill, nil\n\t\t}\n\t}\n\n\treturn nil, fmt.Errorf(\"skill not found: %s\", skillName)\n}\n\n// loadSkillFromDirectory attempts to load a skill from a specific directory\nfunc (l *Loader) loadSkillFromDirectory(dir, skillName string) (*Skill, error) {\n\t// First, check if we can find by directory name matching skill name\n\tskillPath := filepath.Join(dir, skillName)\n\tskillFile := filepath.Join(skillPath, SkillFileName)\n\n\tif _, err := os.Stat(skillFile); err == nil {\n\t\treturn l.loadSkillFile(skillPath, skillFile)\n\t}\n\n\t// Otherwise, scan all subdirectories to find the skill by name\n\tentries, err := os.ReadDir(dir)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/agent/skills/loader.go#L107-L143","documentation":"Terminal failure of LoadSkillInstructions: after checking the cache and scanning every configured skill directory via loadSkillFromDirectory, no directory contained a SKILL.md whose parsed name matches the requested skillName. It means the skill was never discovered, was renamed, or lives outside the configured skillDirs.","triggerScenarios":"Thrown at internal/agent/skills/loader.go:125 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the skill name spelling matches the SKILL.md frontmatter name exactly","Check that the skill's directory is included in the loader's skillDirs configuration","Run skill discovery/Initialize first so the cache is populated","Confirm the SKILL.md parses successfully (parse failures inside directories are swallowed, making the skill invisible)"],"exampleFix":null,"handlingStrategy":"fallback","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"}