{"record":{"id":"b1f19ab4d4e8aeec","repo":"paperclipai/paperclip","slug":"catalog-skill-not-found-catalogref","errorCode":null,"errorMessage":"Catalog skill not found: ${catalogRef}","messagePattern":"Catalog skill not found: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/skills.ts","lineNumber":600,"sourceCode":"  ctx: ResolvedClientContext,\n  opts: CatalogBrowseOptions,\n): Promise<CatalogSkill[]> {\n  const params = new URLSearchParams();\n  appendQueryParam(params, \"kind\", opts.kind);\n  appendQueryParam(params, \"category\", opts.category);\n  appendQueryParam(params, \"q\", opts.query);\n  const query = params.toString();\n  return (await ctx.api.get<CatalogSkill[]>(`/api/skills/catalog${query ? `?${query}` : \"\"}`)) ?? [];\n}\n\nasync function getCatalogSkill(ctx: ResolvedClientContext, catalogRef: string): Promise<CatalogSkill> {\n  const ref = catalogRef.trim();\n  if (!ref) {\n    throw new Error(\"Catalog skill reference is required.\");\n  }\n  const detail = await ctx.api.get<CatalogSkill>(`/api/skills/catalog/ref?ref=${encodeURIComponent(ref)}`);\n  if (!detail) {\n    throw new Error(`Catalog skill not found: ${catalogRef}`);\n  }\n  return detail;\n}\n\nexport function resolveCompanySkillReference(\n  skills: CompanySkillReferenceTarget[],\n  reference: string,\n): CompanySkillReferenceTarget {\n  const trimmed = reference.trim();\n  if (!trimmed) {\n    throw new Error(\"Skill reference is required.\");\n  }\n\n  const byId = skills.find((skill) => skill.id === trimmed);\n  if (byId) return byId;\n\n  const byKey = skills.find((skill) => skill.key === trimmed);\n  if (byKey) return byKey;","sourceCodeStart":582,"sourceCodeEnd":618,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/cli/src/commands/client/skills.ts#L582-L618","documentation":"Thrown by getCatalogSkill() after GET /api/skills/catalog/ref returns null/undefined for a non-empty ref. It means the server could not resolve the given catalog skill identifier (ID, key, or slug) in the app-shipped catalog. The CLI treats a null body as not-found rather than crashing on undefined fields.","triggerScenarios":"`paperclipai skills inspect <ref>` where <ref> is a typo, an ID from a different Paperclip deployment/version, a slug that no longer exists, or a value that belongs to teams rather than skills.","commonSituations":"Catalog updated between sessions removing/renaming a skill, cross-environment confusion (staging vs prod catalogs), or mistyped keys. Also occurs if the API is unreachable in a way that resolves to an empty 2xx body.","solutions":["Run `paperclipai skills browse` to confirm the exact id/key/slug currently offered.","Copy the identifier verbatim from the browse output.","Verify you are pointing at the correct API base (PAPERCLIP_API_URL / --api-base) for the catalog you expect."],"exampleFix":"// before\nawait run([\"skills\", \"inspect\", \"old-skill-slug\"]);\n// after\nconst rows = await runJson([\"skills\", \"browse\", \"--json\"]);\nconst hit = rows.find(r => r.slug?.includes(\"skill\"));\nif (hit) await run([\"skills\", \"inspect\", hit.id]);","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await run([\"skills\", \"inspect\", ref]);\n} catch (err) {\n  if (err instanceof Error && /Catalog skill not found/.test(err.message)) {\n    console.error(`${ref} is not in this catalog. Run \\`skills browse\\` first.`);\n    process.exit(2);\n  }\n  throw err;\n}","preventionTips":["Verify the ref against `skills browse` before inspect.","Pin the API base to the catalog you expect.","Treat not-found as a recoverable branch in automation, not a hard crash."],"tags":["cli","not-found","skills","catalog","api"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}