{"record":{"id":"20dfbe70ae88dc48","repo":"multica-ai/multica","slug":"list-skill-files-w","errorCode":null,"errorMessage":"list skill files: %w","messagePattern":"list skill files: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_skill.go","lineNumber":650,"sourceCode":"\treturn nil\n}\n\n// ---------------------------------------------------------------------------\n// Skill file subcommands\n// ---------------------------------------------------------------------------\n\nfunc runSkillFilesList(cmd *cobra.Command, args []string) error {\n\tclient, err := newAPIClient(cmd)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tctx, cancel := cli.APIContext(context.Background())\n\tdefer cancel()\n\n\tvar files []map[string]any\n\tif err := client.GetJSON(ctx, \"/api/skills/\"+args[0]+\"/files\", &files); err != nil {\n\t\treturn fmt.Errorf(\"list skill files: %w\", err)\n\t}\n\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"json\" {\n\t\treturn cli.PrintJSON(os.Stdout, files)\n\t}\n\n\theaders := []string{\"ID\", \"PATH\", \"CREATED_AT\", \"UPDATED_AT\"}\n\trows := make([][]string, 0, len(files))\n\tfor _, f := range files {\n\t\trows = append(rows, []string{\n\t\t\tstrVal(f, \"id\"),\n\t\t\tstrVal(f, \"path\"),\n\t\t\tstrVal(f, \"created_at\"),\n\t\t\tstrVal(f, \"updated_at\"),\n\t\t})\n\t}\n\tcli.PrintTable(os.Stdout, headers, rows)","sourceCodeStart":632,"sourceCodeEnd":668,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_skill.go#L632-L668","documentation":"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.","triggerScenarios":"`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.","commonSituations":"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).","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."],"exampleFix":"# before\nmultica skill files list \"my-skill \"   # trailing space in ID\n\n# after\nID=$(multica skill list --output json | jq -r '.[] | select(.name==\"my-skill\") | .id')\nmultica skill files list \"$ID\"","handlingStrategy":"validation","validationCode":"ID=\"$(multica skill list --output json | jq -r --arg n \"$SKILL_NAME\" '.[] | select(.name==$n) | .id')\"\n[ -n \"$ID\" ] || { echo \"no skill named $SKILL_NAME\"; exit 1; }\nmultica skill files list \"$ID\"","typeGuard":null,"tryCatchPattern":"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.","preventionTips":["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."],"tags":["cli","http","skill","files"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}