{"record":{"id":"1e2b1be4bfaea820","repo":"HKUDS/DeepTutor","slug":"skill-already-exists-payload-name","errorCode":null,"errorMessage":"Skill already exists: {payload.name}","messagePattern":"Skill already exists: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":409,"severity":"error","filePath":"deeptutor/api/routers/skills.py","lineNumber":226,"sourceCode":"    detail = assigned_skill_detail(name)\n    if detail is None:\n        raise HTTPException(status_code=404, detail=f\"Skill not found: {name}\")\n    return detail\n\n\n@router.post(\"/create\")\nasync def create_skill(payload: CreateSkillRequest) -> dict[str, object]:\n    service = get_skill_service()\n    try:\n        info = service.create(\n            name=payload.name,\n            description=payload.description,\n            content=payload.content,\n            tags=list(payload.tags or []),\n        )\n        return info.to_dict()\n    except SkillExistsError:\n        raise HTTPException(status_code=409, detail=f\"Skill already exists: {payload.name}\")\n    except InvalidSkillNameError as exc:\n        raise HTTPException(status_code=400, detail=str(exc))\n    except InvalidTagError as exc:\n        raise HTTPException(status_code=400, detail=str(exc))\n\n\n@router.post(\"/install\")\nasync def install_skill(payload: InstallSkillRequest) -> dict[str, object]:\n    \"\"\"Import a hub skill (e.g. from EduHub) into the caller's own skill layer.\n\n    Lands the package in the same per-user dir that ``/create`` writes to, so\n    the imported skill shows up in this user's Skills list. The install gate\n    (``suspicious`` verdict abort, safe extraction, ``always`` stripping)\n    lives in :func:`deeptutor.services.skill.hub.install_from_hub`.\n    \"\"\"\n    import asyncio\n\n    from deeptutor.services.skill.hub import HubError, install_from_hub","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/api/routers/skills.py#L208-L244","documentation":"Error \"Skill already exists: {payload.name}\" thrown in HKUDS/DeepTutor.","triggerScenarios":"Thrown at deeptutor/api/routers/skills.py:226 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}