{"record":{"id":"a85b42d7b2a7ef22","repo":"mastra-ai/mastra","slug":"skill-identifier-not-found-a85b42","errorCode":null,"errorMessage":"Skill \"${identifier}\" not found","messagePattern":"Skill \"(.+?)\" not found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"packages/server/src/server/handlers/workspace.ts","lineNumber":973,"sourceCode":"\n      if (!skillName) {\n        throw new HTTPException(400, { message: 'Skill name is required' });\n      }\n\n      // Use the optional ?path= query param for disambiguation, otherwise fall back to name\n      const identifier = path ? decodeURIComponent(path) : skillName;\n\n      const skills = await getSkillsById(mastra, workspaceId);\n      if (!skills) {\n        throw new HTTPException(404, { message: 'No workspace with skills configured' });\n      }\n\n      // Refresh skills with request context (handles dynamic skill resolvers)\n      await skills.maybeRefresh({ requestContext });\n\n      const skill = await skills.get(identifier);\n      if (!skill) {\n        throw new HTTPException(404, { message: `Skill \"${identifier}\" not found` });\n      }\n\n      return {\n        name: skill.name,\n        description: skill.description,\n        license: skill.license,\n        compatibility: skill.compatibility,\n        metadata: skill.metadata,\n        path: skill.path,\n        instructions: skill.instructions,\n        source: skill.source,\n        references: skill.references,\n        scripts: skill.scripts,\n        assets: skill.assets,\n      };\n    } catch (error) {\n      return handleWorkspaceError(error, 'Error getting skill');\n    }","sourceCodeStart":955,"sourceCodeEnd":991,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/server/src/server/handlers/workspace.ts#L955-L991","documentation":"The get-skill-details route (GET /workspaces/:workspaceId/skills/:skillName) throws this 404 after the skills provider refreshes and skills.get(identifier) returns null — the skill (addressed by name, or by the ?path= query param when disambiguating) does not exist in the configured skills set.","triggerScenarios":"Requesting a skillName that isn't installed/discovered; passing a ?path= disambiguation value that doesn't match a discovered skill path; case-sensitivity mismatch; skill directory not yet scanned (or removed) when the request arrives; dynamic skill resolver returning nothing for this context.","commonSituations":"Typo'd or renamed skill names; skills installed under a different glob than the server's configured one; requesting before skills.sh install completed; ?path= pointing to a skill in another workspace root; stale client caches referencing deleted skills.","solutions":["List skills via GET /workspaces/:id/skills and use an exact returned name (or its path as ?path=).","Verify the skill's SKILL.md exists under the workspace's configured skills globs.","Install the skill (e.g. via skills.sh) before requesting it.","Check case and URL-encoding of skillName/path; correct the identifier."],"exampleFix":"// before\nawait fetch(`/api/workspaces/ws1/skills/code-reveiwer`);\n// after\nconst { skills } = await fetch(`/api/workspaces/ws1/skills`).then(r => r.json());\nawait fetch(`/api/workspaces/ws1/skills/${encodeURIComponent(skills[0].name)}`);","handlingStrategy":"fallback","validationCode":"// Ensure the skill exists before fetching details\nconst { skills } = await fetch(`/api/workspaces/${wsId}/skills`).then(r => r.json());\nconst known = skills.some(s => s.name === skillName || s.path === disambiguationPath);\nif (!known) throw new Error(`Skill ${skillName} is not installed in workspace ${wsId}`);","typeGuard":"function skillExists(list: { name: string; path: string }[], identifier: string): boolean {\n  return list.some(s => s.name === identifier || s.path === identifier);\n}","tryCatchPattern":"try {\n  const skill = await getSkill(wsId, identifier);\n} catch (e) {\n  if (isHTTPException(e, 404) && /Skill \".*\" not found/.test(e.message)) {\n    // refresh the skill list / install the skill, then retry once\n  } else throw e;\n}","preventionTips":["Use names/paths exactly as returned by the skills list endpoint","Install skills (skills.sh or files under configured globs) before referencing them","Watch for renames and case sensitivity","Pass ?path= only when it matches a discovered skill path"],"tags":["http-404","skills","workspace","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}