multica-ai/multica · error
list skill files: %w
Error message
list skill files: %w
What it means
Returned by `multica skill files list` when GET `/api/skills/{id}/files` fails. The skill ID is interpolated directly into the path with no client-side format check, so the most common causes are a 404 for a nonexistent/mistyped ID, plus the usual transport/auth/timeout failures. No request body is involved.
Source
Thrown at server/cmd/multica/cmd_skill.go:650
return nil
}
// ---------------------------------------------------------------------------
// Skill file subcommands
// ---------------------------------------------------------------------------
func runSkillFilesList(cmd *cobra.Command, args []string) error {
client, err := newAPIClient(cmd)
if err != nil {
return err
}
ctx, cancel := cli.APIContext(context.Background())
defer cancel()
var files []map[string]any
if err := client.GetJSON(ctx, "/api/skills/"+args[0]+"/files", &files); err != nil {
return fmt.Errorf("list skill files: %w", err)
}
output, _ := cmd.Flags().GetString("output")
if output == "json" {
return cli.PrintJSON(os.Stdout, files)
}
headers := []string{"ID", "PATH", "CREATED_AT", "UPDATED_AT"}
rows := make([][]string, 0, len(files))
for _, f := range files {
rows = append(rows, []string{
strVal(f, "id"),
strVal(f, "path"),
strVal(f, "created_at"),
strVal(f, "updated_at"),
})
}
cli.PrintTable(os.Stdout, headers, rows)View on GitHub (pinned to 2c0912b6ec)
Solutions
- Confirm the ID with `multica skill list --output json` and pass it verbatim (trim any whitespace).
- Use the ID field, not the skill name, as the positional argument.
- If the ID is right, test connectivity with `multica skill get <id>` — a get success plus files failure indicates a server-side files issue worth checking logs for.
Example fix
# before multica skill files list "my-skill " # trailing space in ID # after ID=$(multica skill list --output json | jq -r '.[] | select(.name=="my-skill") | .id') multica skill files list "$ID"
Defensive patterns
Strategy: validation
Validate before calling
ID="$(multica skill list --output json | jq -r --arg n "$SKILL_NAME" '.[] | select(.name==$n) | .id')"
[ -n "$ID" ] || { echo "no skill named $SKILL_NAME"; exit 1; }
multica skill files list "$ID" Try / catch
On failure, first re-run `skill get <id>` to discriminate bad-ID (404) from transport issues; if get succeeds but files-list fails, capture the wrapped message and check server logs — the CLI cannot tell you more.
Prevention
- Always resolve IDs programmatically from `skill list --output json`, trimming whitespace.
- Use IDs, never names, for files subcommands.
- Re-fetch IDs after any re-import, which recreates files with new IDs.
When it happens
Trigger: `multica skill files list <bad-id>` (404); skill exists but has no files record and the server treats that as 404; auth or connectivity problems; ID containing characters that break the URL path (spaces, slashes) from bad copy-paste.
Common situations: ID copied with surrounding whitespace or a trailing newline from JSON output; referencing a skill by name instead of ID; environment mismatch (dev database vs prod CLI target).
Related errors
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/20dfbe70ae88dc48.
Report an issue: GitHub.