multica-ai/multica · warning

--skill-ids is required (comma-separated skill IDs; use --sk

Error message

--skill-ids is required (comma-separated skill IDs; use --skill-ids '' to clear all)

What it means

Returned by `multica agent skills set <id>` when the --skill-ids flag was not explicitly provided (cmd.Flags().Changed is false). The set subcommand requires an explicit list even to clear — passing `--skill-ids ''` sets an empty list — so omitting the flag entirely is rejected to prevent accidentally wiping an agent's skills.

Source

Thrown at server/cmd/multica/cmd_agent.go:1027

	for _, s := range skills {
		rows = append(rows, []string{
			strVal(s, "id"),
			strVal(s, "name"),
			strVal(s, "description"),
		})
	}
	cli.PrintTable(os.Stdout, headers, rows)
	return nil
}

func runAgentSkillsSet(cmd *cobra.Command, args []string) error {
	client, err := newAPIClient(cmd)
	if err != nil {
		return err
	}

	if !cmd.Flags().Changed("skill-ids") {
		return fmt.Errorf("--skill-ids is required (comma-separated skill IDs; use --skill-ids '' to clear all)")
	}
	cleanIDs := cleanSkillIDsFlag(cmd)
	body := map[string]any{
		"skill_ids": cleanIDs,
	}

	ctx, cancel := cli.APIContext(context.Background())
	defer cancel()

	var result json.RawMessage
	if err := client.PutJSON(ctx, "/api/agents/"+args[0]+"/skills", body, &result); err != nil {
		return fmt.Errorf("set agent skills: %w", err)
	}

	return printAgentSkillsMutationResult(cmd, args[0], result)
}

func runAgentSkillsAdd(cmd *cobra.Command, args []string) error {

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Pass the flag explicitly: `multica agent skills set <id> --skill-ids skA,skB`
  2. To remove all skills deliberately: `multica agent skills set <id> --skill-ids ''`
  3. In scripts, build the flag unconditionally or skip the command when the list is empty
  4. Check flag spelling with `multica agent skills set --help`

Example fix

# before
multica agent skills set agt_1
# Error: --skill-ids is required (comma-separated skill IDs; use --skill-ids '' to clear all)

# after
multica agent skills set agt_1 --skill-ids sk_abc,sk_def
multica agent skills set agt_1 --skill-ids ''   # clear all
Defensive patterns

Strategy: validation

Validate before calling

[ -n "${SKILL_IDS+x}" ] && multica agent skills set "$AGENT_ID" --skill-ids "$SKILL_IDS" || echo 'skip: no skill-ids flag'

Try / catch

if !cmd.Flags().Changed("skill-ids") {
	return fmt.Errorf("--skill-ids is required (comma-separated skill IDs; use --skill-ids '' to clear all)")
}

Prevention

When it happens

Trigger: Running `multica agent skills set agt_1` with no --skill-ids, or a script that conditionally appends the flag and the condition evaluates false.

Common situations: Scripts built around optional flags; users expecting set with no args to be a no-op; typos like `--skillids` silently ignored by cobra parsing in copy-pasted commands.

Related errors


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/46da4687f8ce296e. Report an issue: GitHub.