{"record":{"id":"676140364b66c92b","repo":"Significant-Gravitas/AutoGPT","slug":"skill-slug-not-found","errorCode":null,"errorMessage":"Skill '{slug}' not found","messagePattern":"Skill '(.+?)' not found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/v1.py","lineNumber":2746,"sourceCode":"    except OSError:\n        # Don't leak the on-disk path; operators trace via server logs.\n        logger.exception(\"[skills] failed to load default skill body for %s\", slug)\n        raise HTTPException(\n            status_code=500,\n            detail=\"Failed to load default skill body\",\n        )\n    if default is not None:\n        return CopilotSkillDetail(\n            name=default.name,\n            description=default.description,\n            triggers=list(default.triggers),\n            body=default.body,\n            is_default=True,\n        )\n\n    parsed = await read_user_skill_with_body(user_id, slug)\n    if parsed is None:\n        raise HTTPException(\n            status_code=HTTP_404_NOT_FOUND, detail=f\"Skill '{slug}' not found\"\n        )\n    sibling_files = await list_user_skill_sibling_paths(user_id, slug)\n    return CopilotSkillDetail(\n        name=parsed.name,\n        description=parsed.description,\n        triggers=list(parsed.triggers),\n        body=parsed.body,\n        version=parsed.version,\n        is_default=False,\n        sibling_files=sibling_files,\n    )\n\n\n@v1_router.delete(\n    path=\"/skills/{name}\",\n    summary=\"Delete a user-distilled copilot skill\",\n    operation_id=\"deleteCopilotSkill\",","sourceCodeStart":2728,"sourceCodeEnd":2764,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/v1.py#L2728-L2764","documentation":"Skill-detail endpoint returns 404 when the slug (name path parameter, strip().lower()-ed) matches no built-in default AND `read_user_skill_with_body(user_id, slug)` returns None — i.e. the authenticated user has no stored user-distilled skill with that slug. Defaults are checked first, so this branch means specifically 'not a default and not one of your skills'.","triggerScenarios":"GET /skills/{name} with a typo'd slug, a slug of another user's skill, or a slug deleted by the user (or overwritten) before the detail fetch.","commonSituations":"Expand-to-view dialogs opened from a stale skill list after deletion elsewhere; case/whitespace mismatches (slug is lowercased and trimmed server-side, callers sending CamelCase or padded slugs); links shared between users where skills are per-user.","solutions":["Re-fetch the skill list and only open details for slugs present in it (exact lowercase form).","Normalize client-side: slug = name.trim().toLowerCase() before requesting.","Remember user skills are per-user — another user's skill slug will 404 for you; defaults are shared."],"exampleFix":"// before\nconst detail = await api.getSkill(rawName);\n// after\nconst slug = rawName.trim().toLowerCase();\nconst detail = await api.getSkill(slug);","handlingStrategy":"type-guard","validationCode":"const skills = await api.listSkills();\nconst target = skills.find(s => s.name === slug);\nif (!target) { refreshSkillList(); return; }","typeGuard":"function isKnownSkillSlug(slug: string, known: {name: string}[]): boolean {\n  return known.some(s => s.name === slug.trim().toLowerCase());\n}","tryCatchPattern":"try {\n  return await api.getSkillDetail(slug);\n} catch (e) {\n  if (e.status === 404) { await refreshSkillList(); return null; }\n  throw e;\n}","preventionTips":["Normalize slugs (trim + lowercase) before requesting details.","Only open details for slugs present in the freshly fetched list.","Remember skills are per-user; defaults are the only shared ones."],"tags":["http-404","skills","slug-normalization","per-user-data"],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}