HKUDS/DeepTutor · error · HTTPException

Skill not found

Error message

Skill not found: {name}

What it means

Terminal lookup in GET /skills/{name}: the skill was not found in the user's scope, and the follow-up admin-grant lookup also returned nothing — neither owned nor assigned, so the name is unknown and 404 is raised.

Solutions

  1. List available skills to confirm the exact name
  2. Request an administrator grant for the skill if it should be accessible
  3. Check for typos/case differences — skill names are matched exactly
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at deeptutor/api/routers/skills.py:205 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27). Data as JSON: /api/errors/85099ebd9b05d894. Report an issue: GitHub.

Appendix: source

Thrown at deeptutor/api/routers/skills.py:205

    return detail


@router.get("/{name}")
async def get_skill(name: str) -> dict[str, object]:
    service = get_skill_service()
    try:
        return service.get_detail(name).to_dict()
    except SkillNotFoundError:
        # User scope doesn't have it. Fall through to admin-assigned lookup
        # below, which returns 403 if the user has no grant for it.
        pass
    except InvalidSkillNameError as exc:
        raise HTTPException(status_code=400, detail=str(exc))

    user = get_current_user()
    if user.is_admin:
        # Admin scope already checked above; nothing else to look at.
        raise HTTPException(status_code=404, detail=f"Skill not found: {name}")
    if name not in assigned_skill_ids(user.id):
        raise HTTPException(status_code=403, detail="Skill is not assigned to you")
    detail = assigned_skill_detail(name)
    if detail is None:
        raise HTTPException(status_code=404, detail=f"Skill not found: {name}")
    return detail


@router.post("/create")
async def create_skill(payload: CreateSkillRequest) -> dict[str, object]:
    service = get_skill_service()
    try:
        info = service.create(
            name=payload.name,
            description=payload.description,
            content=payload.content,
            tags=list(payload.tags or []),
        )

View on GitHub (pinned to 3e82f13042)