multica-ai/multica · warning
--content is required
Error message
--content is required
What it means
Client-side validation in `multica skill files upsert`: content resolution via resolveSkillContentFlag produced nothing — neither --content nor whatever alternate source that helper supports (e.g. --content-file/stdin) yielded non-empty text. The check requires both hasContent (a source was given) and non-empty text, so this fires for a missing flag, an empty string, or an empty auxiliary file/stdin.
Source
Thrown at server/cmd/multica/cmd_skill.go:687
return nil
}
func runSkillFilesUpsert(cmd *cobra.Command, args []string) error {
client, err := newAPIClient(cmd)
if err != nil {
return err
}
filePath, _ := cmd.Flags().GetString("path")
if filePath == "" {
return fmt.Errorf("--path is required")
}
content, hasContent, err := resolveSkillContentFlag(cmd)
if err != nil {
return err
}
if !hasContent || content == "" {
return fmt.Errorf("--content is required")
}
body := map[string]any{
"path": filePath,
"content": content,
}
ctx, cancel := cli.APIContext(context.Background())
defer cancel()
var result map[string]any
if err := client.PutJSON(ctx, "/api/skills/"+args[0]+"/files", body, &result); err != nil {
return fmt.Errorf("upsert skill file: %w", err)
}
output, _ := cmd.Flags().GetString("output")
if output == "json" {
return cli.PrintJSON(os.Stdout, result)View on GitHub (pinned to 2c0912b6ec)
Solutions
- Provide the text explicitly: `--content "..."` or a non-empty file/stdin source per the command's --help.
- If generating content in a pipeline, verify it first: `test -s /tmp/content.txt && multica skill files upsert ...`.
- Check `multica skill files upsert --help` for all accepted content-source flags so you use the intended one.
Example fix
# before cat empty.txt | multica skill files upsert sk-1 --path SKILL.md # after printf '# My skill\n' > content.md test -s content.md && multica skill files upsert sk-1 --path SKILL.md --content "$(cat content.md)"
Defensive patterns
Strategy: validation
Validate before calling
test -s "$CONTENT_FILE" || { echo "content file empty or missing: $CONTENT_FILE"; exit 1; }
multica skill files upsert "$SKILL_ID" --path p.md --content "$(cat "$CONTENT_FILE")" Prevention
- Generate content to a file and check it is non-empty (test -s) before upserting.
- When piping into the CLI, ensure the upstream generator cannot emit zero bytes silently.
- Check --help for every accepted content source flag rather than guessing.
When it happens
Trigger: Omitting --content entirely; passing `--content ""`; piping empty stdin (`multica skill files upsert ... < /dev/null`) when the helper reads stdin; --content-file pointing at an empty file.
Common situations: Script pipes a generator whose output was empty (grep found nothing upstream); heredoc with a typo producing zero lines; user expects the command to open an editor.
Related errors
- either --url or --file is required
- --path is required
- --cutoff is required; use the hosted deployment time of the
- --batch-size must be positive
- --%s, --%s-stdin, and --%s-file are mutually exclusive; pick
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/a155928ada461182.
Report an issue: GitHub.