{"record":{"id":"f6b4133999f4fa0b","repo":"mastra-ai/mastra","slug":"skills-storage-domain-is-not-available-f6b413","errorCode":null,"errorMessage":"Skills storage domain is not available","messagePattern":"Skills storage domain is not available","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"critical","filePath":"packages/server/src/server/handlers/stored-skills.ts","lineNumber":143,"sourceCode":"    perPage,\n    orderBy,\n    status,\n    authorId,\n    visibility,\n    metadata,\n    favoritedOnly,\n    pinFavoritedFor,\n  }) => {\n    try {\n      const storage = mastra.getStorage();\n\n      if (!storage) {\n        throw new HTTPException(500, { message: 'Storage is not configured' });\n      }\n\n      const skillStore = await storage.getStore('skills');\n      if (!skillStore) {\n        throw new HTTPException(500, { message: 'Skills storage domain is not available' });\n      }\n\n      const filter = resolveAuthorFilter({\n        requestContext,\n        resource: 'stored-skills',\n        queryAuthorId: authorId,\n        queryVisibility: visibility,\n      });\n\n      const scope = await getStoredResourceScope(mastra, requestContext);\n      const scopedMetadata = scopeStoredResourceMetadata(metadata, scope);\n\n      const callerId = getCallerAuthorId(requestContext);\n      const favoritesEnabled = await isBuilderFeatureEnabled(mastra, 'favorites');\n      const honoredStarredOnly = favoritesEnabled && favoritedOnly === true;\n      const favoriteSubjectId = pinFavoritedFor ?? callerId;\n\n      // `?favoritedOnly=true` flow: fetch caller's favorited IDs, restrict the list","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/server/src/server/handlers/stored-skills.ts#L125-L161","documentation":"Storage exists but storage.getStore('skills') returns undefined, so the stored-skills list handler throws HTTPException 500 'Skills storage domain is not available'. Modern Mastra storage is split into domain stores ('skills', 'favorites', etc.); the configured adapter must implement the skills domain for these routes to work.","triggerScenarios":"Listing stored skills when the configured storage adapter lacks a 'skills' store — getStore('skills') resolves to undefined because the adapter class doesn't implement that domain or its registration/schema init failed.","commonSituations":"Older or custom storage adapters predating the skills domain; database migrations for the skills tables not applied; version mismatch between @mastra/core and the storage package so the domain isn't recognized.","solutions":["Upgrade to a storage adapter version that implements the skills domain (align @mastra/core and storage package versions)","Run schema migrations/setup for the configured backend so skills tables exist","Test storage.getStore('skills') directly against your deployed storage config","For custom adapters, implement the skills store and return it from getStore('skills')"],"exampleFix":"// before\nstorage: new CustomLegacyStore(); // no skills domain\n\n// after\nstorage: new LibSQLStore({ url: process.env.DATABASE_URL }); // implements skills + favorites","handlingStrategy":"validation","validationCode":"const storage = mastra.getStorage();\nif (!storage || !(await storage.getStore('skills'))) {\n  throw new Error('Storage adapter does not provide the skills domain');\n}","typeGuard":"function providesSkillsDomain(s: { getStore(d: string): Promise<unknown> } | undefined): s is { getStore(d: 'skills'): Promise<unknown> } {\n  return !!s;\n}","tryCatchPattern":"try {\n  return await api.get('/stored/skills');\n} catch (e) {\n  if (isHttpError(e) && /Skills storage domain/.test(e.message)) {\n    alertOps('skills domain missing from storage adapter'); return emptyPage;\n  }\n  throw e;\n}","preventionTips":["Run a post-migration smoke test calling getStore('skills')","Upgrade core and storage packages together","Document required domains for custom storage implementations"],"tags":["storage","configuration","server","stored-skills"],"backgroundTag":"storage-domain-unavailable","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}