multica-ai/multica · error
--content, --content-stdin, and --content-file are mutually
Error message
--content, --content-stdin, and --content-file are mutually exclusive
What it means
Input validation in the skill create/update content resolution: more than one of --content, --content-stdin, and --content-file was supplied. The CLI counts the provided sources and rejects counts above one because there is no defined precedence among them, so the user's intended content would be ambiguous.
Source
Thrown at server/cmd/multica/cmd_skill.go:198
// trimmed, so agents can round-trip generated SKILL.md content exactly.
func resolveSkillContentFlag(cmd *cobra.Command) (string, bool, error) {
useStdin, _ := cmd.Flags().GetBool("content-stdin")
inline, _ := cmd.Flags().GetString("content")
filePath, _ := cmd.Flags().GetString("content-file")
inlineSet := cmd.Flags().Changed("content")
sources := 0
if inlineSet {
sources++
}
if useStdin {
sources++
}
if filePath != "" {
sources++
}
if sources > 1 {
return "", false, fmt.Errorf("--content, --content-stdin, and --content-file are mutually exclusive")
}
if useStdin {
data, err := io.ReadAll(os.Stdin)
if err != nil {
return "", false, fmt.Errorf("read stdin for --content-stdin: %w", err)
}
return skillContentBytesToString(data, "stdin content for --content-stdin")
}
if filePath != "" {
data, err := os.ReadFile(filePath)
if err != nil {
return "", false, fmt.Errorf("read file for --content-file: %w", err)
}
return skillContentBytesToString(data, "file content for --content-file")
}
if inlineSet {
return inline, true, nilView on GitHub (pinned to 2c0912b6ec)
Solutions
- Inspect the command line and keep exactly one content source flag.
- For file-based content use only --content-file; for piped content use only --content-stdin.
- If scripting with optional sources, build the flag list conditionally instead of passing all.
Example fix
# before multica skill create --name lint --content-file ./skill.md --content 'x' # after multica skill create --name lint --content-file ./skill.md
Defensive patterns
Strategy: validation
Validate before calling
# Shell: build content flags exclusively
CONTENT_FLAGS=()
[ -n "$CONTENT" ] && CONTENT_FLAGS+=(--content "$CONTENT")
[ -n "$CONTENT_FILE" ] && CONTENT_FLAGS+=(--content-file "$CONTENT_FILE")
[ "${#CONTENT_FLAGS[@]}" -gt 2 ] && { echo "pick one content source"; exit 2; } # >1 pair means >1 source Try / catch
Match 'mutually exclusive' in stderr and report which of --content/--content-stdin/--content-file were combined; fail fast in wrappers instead of picking a winner.
Prevention
- Pass exactly one content flag per command.
- Build flag arrays conditionally in scripts.
- Prefer --content-file for deterministic scripted content.
When it happens
Trigger: Any `multica skill create` or `multica skill update` invocation combining flags, e.g. `--content '{...}' --content-file ./skill.md`, or `--content-stdin` together with either of the others.
Common situations: Copy-pasted command lines accumulating flags; shell scripts that default both a heredoc and a file; muscle memory from tools where later flags override earlier ones.
Related errors
- --name is required
- no fields to update; use --name, --description, --content, o
- --%s, --%s-stdin, and --%s-file are mutually exclusive; pick
- --%s-file: path must not be empty
- --runtime-id must not be empty
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/ad08ac7a3dd53d27.
Report an issue: GitHub.