{"record":{"id":"1c1fce8fe412348f","repo":"paperclipai/paperclip","slug":"no-audit-result-returned-for-skill-skill-key","errorCode":null,"errorMessage":"No audit result returned for skill ${skill.key}.","messagePattern":"No audit result returned for skill (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/skills.ts","lineNumber":731,"sourceCode":"    }\n  }\n  return rows;\n}\n\nasync function auditCompanySkills(\n  ctx: ResolvedClientContext,\n  skillRef: string | undefined,\n): Promise<Array<{ skill: CompanySkillReferenceTarget; audit: CompanySkillAuditResult }>> {\n  const skills = await listCompanySkills(ctx);\n  const selected = skillRef ? [resolveCompanySkillReference(skills, skillRef)] : skills;\n  const rows: Array<{ skill: CompanySkillReferenceTarget; audit: CompanySkillAuditResult }> = [];\n  for (const skill of selected) {\n    const audit = await ctx.api.post<CompanySkillAuditResult>(\n      `/api/companies/${ctx.companyId}/skills/${encodeURIComponent(skill.id)}/audit`,\n      {},\n    );\n    if (!audit) {\n      throw new Error(`No audit result returned for skill ${skill.key}.`);\n    }\n    rows.push({ skill: toSkillReferenceTarget(skill), audit });\n  }\n  return rows;\n}\n\nasync function resolveAgent(ctx: ResolvedClientContext, agentRef: string): Promise<Agent> {\n  const params = new URLSearchParams({ companyId: ctx.companyId ?? \"\" });\n  const agent = await ctx.api.get<Agent>(`/api/agents/${encodeURIComponent(agentRef)}?${params.toString()}`);\n  if (!agent) {\n    throw new Error(`Agent not found: ${agentRef}`);\n  }\n  return agent;\n}\n\nfunction printCompanySkillRows(rows: Array<CompanySkillListItem | CompanySkill>): void {\n  if (rows.length === 0) {\n    printOutput([], { json: false });","sourceCodeStart":713,"sourceCodeEnd":749,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/cli/src/commands/client/skills.ts#L713-L749","documentation":"Thrown by auditCompanySkills() when POST /api/companies/{companyId}/skills/{skillId}/audit returns null/undefined. The audit endpoint is expected to return a CompanySkillAuditResult; null indicates the server did not produce an audit (empty body, unsupported route, or upstream error swallowed).","triggerScenarios":"`paperclipai skills audit [skillRef]` against a server that does not implement the audit route, returns 200 with no JSON, or fails to audit a particular skill (e.g. empty skill body).","commonSituations":"CLI newer than the deployed server (audit added later), skill whose files are empty/missing on disk, or an audit worker that crashed server-side but still returned 2xx.","solutions":["Verify server version supports skill audit (`/api/health`, release notes).","Try auditing a different skill to isolate whether it is skill-specific or route-level.","Reinstall the skill (`skills install --force`) if its bytes are missing, then re-audit."],"exampleFix":"# before\npaperclipai skills audit my-skill\n# after: confirm route exists, then re-audit a known-good skill\npaperclipai skills audit other-skill","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"function isAuditResult(v: unknown): v is CompanySkillAuditResult {\n  return v != null && typeof v === \"object\";\n}","tryCatchPattern":"try {\n  await run([\"skills\", \"audit\", ref]);\n} catch (err) {\n  if (err instanceof Error && /No audit result returned/.test(err.message)) {\n    console.error(\"Audit route returned nothing; verify server supports skill audit.\");\n    process.exit(2);\n  }\n  throw err;\n}","preventionTips":["Confirm the server version implements the audit route.","Audit a known-good skill to isolate skill-specific failures.","Reinstall skills with missing bytes before auditing."],"tags":["cli","api","skills","audit","null-response"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}