{"record":{"id":"ef5427dee5fcdf53","repo":"paperclipai/paperclip","slug":"use-either-a-skill-reference-or-all-not-both","errorCode":null,"errorMessage":"Use either a skill reference or --all, not both.","messagePattern":"Use either a skill reference or --all, not both\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/skills.ts","lineNumber":383,"sourceCode":"        } catch (err) {\n          handleCommandError(err);\n        }\n      }),\n    { includeCompany: true },\n  );\n\n  addCommonClientOptions(\n    skills\n      .command(\"update\")\n      .description(\"Install company skill updates\")\n      .argument(\"[skillRef]\", \"Company skill ID, key, or unique slug\")\n      .option(\"--all\", \"Check all skills and install available updates\", false)\n      .option(\"--force\", \"Discard local-modification or soft-audit holds; hard-stop audit findings still fail\", false)\n      .action(async (skillRef: string | undefined, opts: SkillUpdateOptions) => {\n        try {\n          const ctx = resolveCommandContext(opts, { requireCompany: true });\n          if (opts.all && skillRef?.trim()) {\n            throw new Error(\"Use either a skill reference or --all, not both.\");\n          }\n          const rows = opts.all\n            ? await updateAllCompanySkills(ctx, opts)\n            : [await updateOneCompanySkill(ctx, requireSkillRef(skillRef), opts)];\n          if (ctx.json) {\n            printOutput(rows.length === 1 && !opts.all ? rows[0] : rows, { json: true });\n            return;\n          }\n          printCompanySkillUpdateRows(rows);\n        } catch (err) {\n          handleCommandError(err);\n        }\n      }),\n    { includeCompany: true },\n  );\n\n  addCommonClientOptions(\n    skills","sourceCodeStart":365,"sourceCodeEnd":401,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/cli/src/commands/client/skills.ts#L365-L401","documentation":"The `skills update` command accepts either an optional `<skillRef>` argument (update one skill) or the `--all` flag (check/update every company skill). Providing both is ambiguous — `--all` would ignore the specific ref — so the action throws before doing any work. The check is `opts.all && skillRef?.trim()`.","triggerScenarios":"Running `paperclipai skills update <skillRef> --all`; a script that always passes `--all` while also forwarding a positional ref.","commonSituations":"Wrapping the command in a helper that unconditionally adds `--all` and also forwards a user-supplied ref; misunderstanding that the two modes are mutually exclusive.","solutions":["Drop one: update a single skill with `skills update <skillRef>`, or update all with `skills update --all`","In scripts, branch on whether a ref was supplied before adding `--all`"],"exampleFix":"# before\npaperclipai skills update my-skill --all\n# after\npaperclipai skills update my-skill\n# or\npaperclipai skills update --all","handlingStrategy":"validation","validationCode":"function assertSkillUpdateMode(skillRef: string | undefined, all: boolean): void {\n  if (all && skillRef?.trim()) {\n    throw new Error(\"Use either a skill reference or --all, not both.\");\n  }\n}\nassertSkillUpdateMode(skillRef, Boolean(opts.all));","typeGuard":"function isSingleSkillUpdate(opts: { all?: boolean }, skillRef: string | undefined): opts is { all: false } {\n  return !opts.all && Boolean(skillRef?.trim());\n}","tryCatchPattern":null,"preventionTips":["Treat <skillRef> and --all as mutually exclusive modes","In scripts, branch on whether a ref is present before adding --all","Prefer --all only for bulk checks"],"tags":["cli","skills","validation","mutual-exclusion"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}