{"record":{"id":"405ca97a7b62369d","repo":"paperclipai/paperclip","slug":"skill-not-found-reference","errorCode":null,"errorMessage":"Skill not found: ${reference}","messagePattern":"Skill not found: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/skills.ts","lineNumber":627,"sourceCode":"  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;\n\n  const normalizedSlug = normalizeSkillSlug(trimmed);\n  const bySlug = skills.filter((skill) => skill.slug === normalizedSlug);\n  if (bySlug.length === 1 && bySlug[0]) return bySlug[0];\n  if (bySlug.length > 1) {\n    throw new Error(`Ambiguous skill slug \"${trimmed}\". Use a skill ID or key instead.`);\n  }\n\n  throw new Error(`Skill not found: ${reference}`);\n}\n\nasync function resolveCompanySkill(\n  ctx: ResolvedClientContext,\n  reference: string,\n): Promise<CompanySkillReferenceTarget> {\n  return resolveCompanySkillReference(await listCompanySkills(ctx), reference);\n}\n\nasync function checkCompanySkills(\n  ctx: ResolvedClientContext,\n  skillRef: string | undefined,\n): Promise<CompanySkillCheckRow[]> {\n  const skills = await listCompanySkills(ctx);\n  const selected = skillRef ? [resolveCompanySkillReference(skills, skillRef)] : skills;\n  const rows: CompanySkillCheckRow[] = [];\n  for (const skill of selected) {\n    const status = await ctx.api.get<CompanySkillUpdateStatus>(","sourceCodeStart":609,"sourceCodeEnd":645,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/cli/src/commands/client/skills.ts#L609-L645","documentation":"Thrown by resolveCompanySkillReference() as the final fallback: the reference matched no installed company skill by id, key, or (unique) slug. It means the skill is not installed in the current company, or the identifier is wrong. This is the normal 'no such skill' error for company-scoped skill operations.","triggerScenarios":"Running `skills show|files|update|reset|remove|audit <ref>` or an agent sync with a ref that is not present among the company's installed skills. Also hit when using a catalog id before installing it.","commonSituations":"Forgetting to `skills install` a catalog skill first, targeting a skill from another company, stale cached id after a re-install, or simple typos.","solutions":["Run `paperclipai skills list` and copy the exact id/key.","If the skill exists only in the catalog, install it first with `skills install <catalogRef>`.","Confirm --company-id / PAPERCLIP_COMPANY_ID points at the company that actually has the skill."],"exampleFix":"# before\npaperclipai skills show codereview\n# after\npaperclipai skills install codereview   # if it is a catalog skill\npaperclipai skills list                 # grab the installed id\npaperclipai skills show <installed-id>","handlingStrategy":"try-catch","validationCode":"const installed = await runJson([\"skills\", \"list\", \"--json\"]);\nconst exists = installed.some(s => s.id === ref || s.key === ref || s.slug === normalizeSlug(ref));\nif (!exists && !ref) throw new Error(\"Skill not installed; run `skills install` first.\");","typeGuard":"function skillExists(skills: Array<{id:string;key?:string;slug?:string}>, ref: string): boolean {\n  return skills.some(s => s.id === ref || s.key === ref || s.slug === ref);\n}","tryCatchPattern":"try {\n  await run([\"skills\", \"show\", ref]);\n} catch (err) {\n  if (err instanceof Error && /Skill not found/.test(err.message)) {\n    console.error(\"Not installed. Try `skills install \" + ref + \"`.\");\n    process.exit(2);\n  }\n  throw err;\n}","preventionTips":["Always install a catalog skill before referencing it in company commands.","Confirm company scope matches where the skill lives.","Cache `skills list` ids rather than reconstructing refs."],"tags":["cli","not-found","skills","resolution"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}