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(
skillsView on GitHub (pinned to 67001ec6eb)
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`
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
- 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
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
- Use only one of --value or --value-env.
- At least one --skill value is required for skills agent sync
- Catalog skill reference is required.
- Skill reference is required.
- Skill reference is required unless --all is used.
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/ef5427dee5fcdf53.
Report an issue: GitHub.