multica-ai/multica · error

--name is required

Error message

--name is required

What it means

Simple flag validation in `multica skill create`: --name was omitted or passed empty. name is the only required field in the create body, and the API would reject the request without it, so the CLI fails fast before any network call.

Source

Thrown at server/cmd/multica/cmd_skill.go:302

	rows := [][]string{{
		strVal(skill, "id"),
		strVal(skill, "name"),
		strVal(skill, "description"),
		strVal(skill, "created_at"),
	}}
	cli.PrintTable(os.Stdout, headers, rows)
	return nil
}

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

	name, _ := cmd.Flags().GetString("name")
	if name == "" {
		return fmt.Errorf("--name is required")
	}

	body := map[string]any{
		"name": name,
	}
	if v, _ := cmd.Flags().GetString("description"); v != "" {
		body["description"] = v
	}
	content, hasContent, err := resolveSkillContentFlag(cmd)
	if err != nil {
		return err
	}
	if hasContent && content != "" {
		body["content"] = content
	}
	if cmd.Flags().Changed("config") {
		v, _ := cmd.Flags().GetString("config")
		var config any

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Pass a non-empty --name: `multica skill create --name <name>`.
  2. In scripts, guard: `: "${SKILL_NAME:?SKILL_NAME must be set}" before invoking multica.
  3. Check `multica skill create --help` for the current flag set if upgrading from an older CLI.

Example fix

# before
multica skill create --content-file ./skill.md
# after
multica skill create --name lint --content-file ./skill.md
Defensive patterns

Strategy: validation

Validate before calling

: "${SKILL_NAME:?SKILL_NAME must be non-empty}"
multica skill create --name "$SKILL_NAME"

Try / catch

Match '--name is required' in stderr and fail the wrapper with a missing-argument error; there is nothing to retry — the command never reached the network.

Prevention

When it happens

Trigger: Running `multica skill create` without --name, or with `--name ''` (e.g. an unset shell variable expanded to empty).

Common situations: Shell scripts where $SKILL_NAME was never set; assuming the name can be derived from --content-file's filename; flag renamed between versions.

Related errors


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