{"record":{"id":"4192af75fa2f4d29","repo":"Tencent/WeKnora","slug":"skills-are-not-enabled","errorCode":null,"errorMessage":"skills are not enabled","messagePattern":"skills are not enabled","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/agent/skills/manager.go","lineNumber":259,"sourceCode":"// This is used for system prompt injection (Level 1)\nfunc (m *Manager) GetAllMetadata() []*SkillMetadata {\n\tif !m.enabled {\n\t\treturn nil\n\t}\n\n\tm.mu.RLock()\n\tdefer m.mu.RUnlock()\n\n\t// Return a copy to prevent external modification\n\tresult := make([]*SkillMetadata, len(m.metadataCache))\n\tcopy(result, m.metadataCache)\n\treturn result\n}\n\n// LoadSkill loads the full instructions of a skill (Level 2)\nfunc (m *Manager) LoadSkill(ctx context.Context, skillName string) (*Skill, error) {\n\tif !m.enabled {\n\t\treturn nil, fmt.Errorf(\"skills are not enabled\")\n\t}\n\n\t// Check if skill is allowed\n\tif !m.isSkillAllowed(skillName) {\n\t\treturn nil, fmt.Errorf(\"skill not allowed: %s\", skillName)\n\t}\n\n\treturn m.resolveSource(skillName).LoadSkillInstructions(skillName)\n}\n\n// isSkillAllowed checks if a skill is in the allowed list\nfunc (m *Manager) isSkillAllowed(skillName string) bool {\n\tif len(m.allowedSkills) == 0 {\n\t\treturn true\n\t}\n\tfor _, name := range m.allowedSkills {\n\t\tif name == skillName {\n\t\t\treturn true","sourceCodeStart":241,"sourceCodeEnd":277,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/agent/skills/manager.go#L241-L277","documentation":"Feature-flag guard in Manager.LoadSkill: the Manager was constructed with skills disabled (m.enabled == false), so any skill load request is rejected outright. This is a configuration state, not a lookup failure — the skill may exist but the subsystem is off.","triggerScenarios":"Thrown at internal/agent/skills/manager.go:259 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable skills in the manager/agent configuration if skill support is intended","Gate the calling feature (e.g. execute_skill) on skill availability before invoking LoadSkill","Inform the user the skills feature is disabled in this deployment"],"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"}