{"record":{"id":"da83c93dec7e8a1a","repo":"paperclipai/paperclip","slug":"skill-reference-is-required-unless-all-is-used","errorCode":null,"errorMessage":"Skill reference is required unless --all is used.","messagePattern":"Skill reference is required unless --all is used\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/skills.ts","lineNumber":945,"sourceCode":"  }\n}\n\nfunction toSkillReferenceTarget(skill: CompanySkillReferenceTarget): CompanySkillReferenceTarget {\n  return {\n    id: skill.id,\n    key: skill.key,\n    slug: skill.slug,\n    name: skill.name,\n  };\n}\n\nfunction normalizeSkillSlug(value: string): string {\n  return value.trim().toLowerCase().replace(/[^a-z0-9]+/g, \"-\").replace(/^-+|-+$/g, \"\");\n}\n\nfunction requireSkillRef(skillRef: string | undefined): string {\n  if (!skillRef?.trim()) {\n    throw new Error(\"Skill reference is required unless --all is used.\");\n  }\n  return skillRef;\n}\n\nfunction collectOptionValue(value: string, previous: string[]): string[] {\n  return [...previous, value];\n}\n\nfunction emptyToUndefined(values: string[] | undefined): string[] | undefined {\n  return values && values.length > 0 ? values : undefined;\n}\n\nfunction appendQueryParam(params: URLSearchParams, key: string, value: string | undefined): void {\n  const trimmed = value?.trim();\n  if (trimmed) {\n    params.set(key, trimmed);\n  }\n}","sourceCodeStart":927,"sourceCodeEnd":963,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/cli/src/commands/client/skills.ts#L927-L963","documentation":"Thrown by requireSkillRef() inside the `skills update` action when neither `--all` nor a positional `[skillRef]` is supplied. The update command is the only caller: it must know whether to update one skill or all of them, and a bare `skills update` with no arguments and no flag is ambiguous.","triggerScenarios":"Running `paperclipai skills update` with no positional argument and without `--all`. Also if the positional is whitespace-only (trim yields empty).","commonSituations":"Forgetting `--all` in automation, or assuming `skills update` updates everything by default.","solutions":["Pass a specific skill: `paperclipai skills update <skillRef>`.","Or update all skills: `paperclipai skills update --all`.","Do not combine both — the command also rejects `--all` together with a skillRef."],"exampleFix":"# before\npaperclipai skills update\n# after\npaperclipai skills update --all\n# or\npaperclipai skills update my-skill","handlingStrategy":"validation","validationCode":"const args = [\"skills\", \"update\"];\nif (all) args.push(\"--all\");\nelse if (skillRef && skillRef.trim()) args.push(skillRef);\nelse throw new Error(\"Pass a skillRef or --all to skills update.\");\nawait run(args);","typeGuard":"function hasUpdateTarget(all: boolean, ref?: string): boolean {\n  return all || Boolean(ref?.trim());\n}","tryCatchPattern":null,"preventionTips":["Decide explicitly: one skill or --all. Never call bare.","Encode the decision in your wrapper so the CLI always receives one.","Reject --all together with a skillRef at the caller too."],"tags":["cli","validation","skills","usage"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}