{"record":{"id":"46da4687f8ce296e","repo":"multica-ai/multica","slug":"skill-ids-is-required-comma-separated-skill-ids","errorCode":null,"errorMessage":"--skill-ids is required (comma-separated skill IDs; use --skill-ids '' to clear all)","messagePattern":"--skill-ids is required \\(comma-separated skill IDs; use --skill-ids '' to clear all\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"server/cmd/multica/cmd_agent.go","lineNumber":1027,"sourceCode":"\tfor _, s := range skills {\n\t\trows = append(rows, []string{\n\t\t\tstrVal(s, \"id\"),\n\t\t\tstrVal(s, \"name\"),\n\t\t\tstrVal(s, \"description\"),\n\t\t})\n\t}\n\tcli.PrintTable(os.Stdout, headers, rows)\n\treturn nil\n}\n\nfunc runAgentSkillsSet(cmd *cobra.Command, args []string) error {\n\tclient, err := newAPIClient(cmd)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif !cmd.Flags().Changed(\"skill-ids\") {\n\t\treturn fmt.Errorf(\"--skill-ids is required (comma-separated skill IDs; use --skill-ids '' to clear all)\")\n\t}\n\tcleanIDs := cleanSkillIDsFlag(cmd)\n\tbody := map[string]any{\n\t\t\"skill_ids\": cleanIDs,\n\t}\n\n\tctx, cancel := cli.APIContext(context.Background())\n\tdefer cancel()\n\n\tvar result json.RawMessage\n\tif err := client.PutJSON(ctx, \"/api/agents/\"+args[0]+\"/skills\", body, &result); err != nil {\n\t\treturn fmt.Errorf(\"set agent skills: %w\", err)\n\t}\n\n\treturn printAgentSkillsMutationResult(cmd, args[0], result)\n}\n\nfunc runAgentSkillsAdd(cmd *cobra.Command, args []string) error {","sourceCodeStart":1009,"sourceCodeEnd":1045,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_agent.go#L1009-L1045","documentation":"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.","triggerScenarios":"Running `multica agent skills set agt_1` with no --skill-ids, or a script that conditionally appends the flag and the condition evaluates false.","commonSituations":"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.","solutions":["Pass the flag explicitly: `multica agent skills set <id> --skill-ids skA,skB`","To remove all skills deliberately: `multica agent skills set <id> --skill-ids ''`","In scripts, build the flag unconditionally or skip the command when the list is empty","Check flag spelling with `multica agent skills set --help`"],"exampleFix":"# before\nmultica agent skills set agt_1\n# Error: --skill-ids is required (comma-separated skill IDs; use --skill-ids '' to clear all)\n\n# after\nmultica agent skills set agt_1 --skill-ids sk_abc,sk_def\nmultica agent skills set agt_1 --skill-ids ''   # clear all","handlingStrategy":"validation","validationCode":"[ -n \"${SKILL_IDS+x}\" ] && multica agent skills set \"$AGENT_ID\" --skill-ids \"$SKILL_IDS\" || echo 'skip: no skill-ids flag'","typeGuard":null,"tryCatchPattern":"if !cmd.Flags().Changed(\"skill-ids\") {\n\treturn fmt.Errorf(\"--skill-ids is required (comma-separated skill IDs; use --skill-ids '' to clear all)\")\n}","preventionTips":["Always pass --skill-ids explicitly, even when clearing (use '')","Compose the flag unconditionally in scripts or skip the command","Double-check flag spelling against --help"],"tags":["cli","usage","validation","skills"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}