paperclipai/paperclip · error · Error

Use either a skill reference or --all, not both.

Error message

Use either a skill reference or --all, not both.

What it means

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()`.

Source

Thrown at cli/src/commands/client/skills.ts:383

        } catch (err) {
          handleCommandError(err);
        }
      }),
    { includeCompany: true },
  );

  addCommonClientOptions(
    skills
      .command("update")
      .description("Install company skill updates")
      .argument("[skillRef]", "Company skill ID, key, or unique slug")
      .option("--all", "Check all skills and install available updates", false)
      .option("--force", "Discard local-modification or soft-audit holds; hard-stop audit findings still fail", false)
      .action(async (skillRef: string | undefined, opts: SkillUpdateOptions) => {
        try {
          const ctx = resolveCommandContext(opts, { requireCompany: true });
          if (opts.all && skillRef?.trim()) {
            throw new Error("Use either a skill reference or --all, not both.");
          }
          const rows = opts.all
            ? await updateAllCompanySkills(ctx, opts)
            : [await updateOneCompanySkill(ctx, requireSkillRef(skillRef), opts)];
          if (ctx.json) {
            printOutput(rows.length === 1 && !opts.all ? rows[0] : rows, { json: true });
            return;
          }
          printCompanySkillUpdateRows(rows);
        } catch (err) {
          handleCommandError(err);
        }
      }),
    { includeCompany: true },
  );

  addCommonClientOptions(
    skills

View on GitHub (pinned to 67001ec6eb)

Solutions

  1. Drop one: update a single skill with `skills update <skillRef>`, or update all with `skills update --all`
  2. In scripts, branch on whether a ref was supplied before adding `--all`

Example fix

# before
paperclipai skills update my-skill --all
# after
paperclipai skills update my-skill
# or
paperclipai skills update --all
Defensive patterns

Strategy: validation

Validate before calling

function assertSkillUpdateMode(skillRef: string | undefined, all: boolean): void {
  if (all && skillRef?.trim()) {
    throw new Error("Use either a skill reference or --all, not both.");
  }
}
assertSkillUpdateMode(skillRef, Boolean(opts.all));

Type guard

function isSingleSkillUpdate(opts: { all?: boolean }, skillRef: string | undefined): opts is { all: false } {
  return !opts.all && Boolean(skillRef?.trim());
}

Prevention

When it happens

Trigger: Running `paperclipai skills update <skillRef> --all`; a script that always passes `--all` while also forwarding a positional ref.

Common situations: 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.

Related errors


AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12). Data as JSON: /api/errors/ef5427dee5fcdf53. Report an issue: GitHub.