{"record":{"id":"6cc4c943f00b5472","repo":"Tencent/WeKnora","slug":"failed-to-list-skill-files-w","errorCode":null,"errorMessage":"failed to list skill files: %w","messagePattern":"failed to list skill files: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/agent/skills/loader.go","lineNumber":278,"sourceCode":"\t\t\treturn err\n\t\t}\n\n\t\tif info.IsDir() {\n\t\t\treturn nil\n\t\t}\n\n\t\t// Get relative path\n\t\trelPath, err := filepath.Rel(skill.BasePath, path)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfiles = append(files, relPath)\n\t\treturn nil\n\t})\n\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to list skill files: %w\", err)\n\t}\n\n\treturn files, nil\n}\n\n// GetSkillByName returns a cached skill by name\nfunc (l *Loader) GetSkillByName(name string) (*Skill, bool) {\n\tskill, ok := l.discoveredSkills[name]\n\treturn skill, ok\n}\n\n// GetSkillBasePath returns the base path for a skill (always absolute)\nfunc (l *Loader) GetSkillBasePath(skillName string) (string, error) {\n\tskill, ok := l.discoveredSkills[skillName]\n\tif !ok {\n\t\tvar err error\n\t\tskill, err = l.LoadSkillInstructions(skillName)\n\t\tif err != nil {","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/agent/skills/loader.go#L260-L296","documentation":"Wrapper in ListSkillFiles: the recursive filepath.Walk over the skill's base directory returned a non-nil error (walk failure such as unreadable subdirectory, or a Rel computation error inside the walk callback). The listing itself failed, so the caller gets no partial file list.","triggerScenarios":"Thrown at internal/agent/skills/loader.go:278 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix permissions on the skill directory tree so it can be walked","Check for broken symlinks or inaccessible subdirectories","Retry after the skill directory finishes syncing/installing"],"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"}