{"record":{"id":"0e6ee4ad7baedd38","repo":"Tencent/WeKnora","slug":"skill-not-found-s-0e6ee4","errorCode":null,"errorMessage":"skill not found: %s","messagePattern":"skill not found: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/agent/skills/tenant_source.go","lineNumber":261,"sourceCode":"\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tclean, err := safeSkillRelPath(relativePath)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tbasePath, err := sandbox.SkillDirFor(row.Name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn path.Join(basePath, clean), nil\n}\n\nfunc (s *TenantSkillSource) row(name string) (*types.TenantSkillEntity, error) {\n\tif row, ok := s.byName[name]; ok {\n\t\treturn row, nil\n\t}\n\treturn nil, fmt.Errorf(\"skill not found: %s\", name)\n}\n\n// safeSkillRelPath normalises a caller-supplied relative path and refuses\n// anything that leaves the skill directory.\nfunc safeSkillRelPath(relativePath string) (string, error) {\n\ttrimmed := strings.TrimSpace(relativePath)\n\tif trimmed == \"\" {\n\t\treturn \"\", fmt.Errorf(\"skill file path is required\")\n\t}\n\tif path.IsAbs(trimmed) {\n\t\treturn \"\", fmt.Errorf(\"invalid skill file path: %s\", relativePath)\n\t}\n\tclean := path.Clean(trimmed)\n\tif clean == \".\" || clean == \"..\" || strings.HasPrefix(clean, \"../\") {\n\t\treturn \"\", fmt.Errorf(\"invalid skill file path: %s\", relativePath)\n\t}\n\treturn clean, nil\n}","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/agent/skills/tenant_source.go#L243-L279","documentation":"Lookup guard in TenantSkillSource.row: the requested skill name is not in the tenant's by-name skill map, meaning no tenant skill entity with that name exists (or the source was not refreshed since it was created/deleted). All tenant-sourced operations funnel through row(), so this error backs every \"skill not found\" for tenant skills.","triggerScenarios":"Thrown at internal/agent/skills/tenant_source.go:261 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the skill name against the tenant's installed skills list","Refresh/reload the tenant skill source if the skill was recently added","Install the skill for the tenant before referencing it"],"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"}