{"record":{"id":"39c46069a6f3e52e","repo":"mastra-ai/mastra","slug":"no-content-available-for-skill-skillname-39c460","errorCode":null,"errorMessage":"No content available for skill \"${skillName}\"","messagePattern":"No content available for skill \"(.+?)\"","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"warning","filePath":"packages/server/src/server/handlers/workspace.ts","lineNumber":1391,"sourceCode":"    try {\n      const controller = new AbortController();\n      const timeoutId = setTimeout(() => controller.abort(), 10000);\n\n      const url = `${SKILLS_SH_API_URL}/api/skills/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/${encodeURIComponent(skillName)}/content`;\n      const response = await fetch(url, { signal: controller.signal });\n      clearTimeout(timeoutId);\n\n      if (!response.ok) {\n        throw new HTTPException(404, {\n          message: `Could not find skill \"${skillName}\" for ${owner}/${repo}`,\n        });\n      }\n\n      const data = (await response.json()) as { instructions: string; raw: string };\n      const content = data.instructions || data.raw || '';\n\n      if (!content) {\n        throw new HTTPException(404, {\n          message: `No content available for skill \"${skillName}\"`,\n        });\n      }\n\n      return { content };\n    } catch (error) {\n      if (error instanceof HTTPException) {\n        throw error;\n      }\n      return handleError(error, 'Error fetching skill preview');\n    }\n  },\n});\n\n// =============================================================================\n// skills.sh Install Route\n// =============================================================================\n","sourceCodeStart":1373,"sourceCodeEnd":1409,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/server/src/server/handlers/workspace.ts#L1373-L1409","documentation":"HTTPException 404 thrown when the skills.sh content endpoint returned successfully but both 'instructions' and 'raw' fields are empty/missing, so there is no usable content for the requested skill. The handler builds content = data.instructions || data.raw || '' and throws if it is empty.","triggerScenarios":"Requesting instructions for a skill whose registry entry exists but has no instructions or raw content populated upstream (empty strings or absent fields in the JSON response).","commonSituations":"Newly published skills with no README/instructions yet; upstream schema changes renaming the content fields; skills whose content failed to index on skills.sh.","solutions":["Verify the skill has content on skills.sh; if not, publish or add instructions/raw content for it.","Handle the 404 in the client and fall back to reading the skill's SKILL.md directly from the repo.","If this appeared suddenly, check whether the upstream response schema changed (field names no longer 'instructions'/'raw')."],"exampleFix":"// before\nconst { content } = await fetchInstructions(skillName); // throws when empty\n// after\nconst res = await fetchInstructions(skillName).catch(() => null);\nconst content = res?.content ?? (await fetchRawSkillMdFromRepo(owner, repo, skillName));","handlingStrategy":"fallback","validationCode":"// Cannot pre-validate content, but validate the response shape when you can call the API directly\nconst data = await res.json();\nif (!data || (!data.instructions && !data.raw)) throw new Error('Skill has no content upstream');","typeGuard":"function hasSkillContent(d: unknown): d is { instructions?: string; raw?: string } {\n  const o = d as any;\n  return !!o && (typeof o.instructions === 'string' && o.instructions.length > 0 || typeof o.raw === 'string' && o.raw.length > 0);\n}","tryCatchPattern":"try {\n  return await fetchSkillInstructions(owner, repo, skillName);\n} catch (e) {\n  if (/No content available/.test(String(e))) {\n    return fetchFallbackFromRepo(owner, repo, skillName); // e.g. raw SKILL.md from GitHub\n  }\n  throw e;\n}","preventionTips":["Only request instructions for skills known to have published content.","Maintain a fallback source (repo raw file) for skills with empty upstream content.","Alert on repeated empty-content responses — often a sign of upstream schema drift."],"tags":["http-404","empty-content","upstream-api","skills"],"backgroundTag":"empty-skill-content","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}