{"record":{"id":"b43290cf21cc7e29","repo":"multica-ai/multica","slug":"list-agent-skills-w","errorCode":null,"errorMessage":"list agent skills: %w","messagePattern":"list agent skills: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_agent.go","lineNumber":999,"sourceCode":"\treturn nil\n}\n\n// ---------------------------------------------------------------------------\n// Agent skills subcommands\n// ---------------------------------------------------------------------------\n\nfunc runAgentSkillsList(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 skills []map[string]any\n\tif err := client.GetJSON(ctx, \"/api/agents/\"+args[0]+\"/skills\", &skills); err != nil {\n\t\treturn fmt.Errorf(\"list agent skills: %w\", err)\n\t}\n\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"json\" {\n\t\treturn cli.PrintJSON(os.Stdout, skills)\n\t}\n\n\theaders := []string{\"ID\", \"NAME\", \"DESCRIPTION\"}\n\trows := make([][]string, 0, len(skills))\n\tfor _, s := range skills {\n\t\trows = append(rows, []string{\n\t\t\tstrVal(s, \"id\"),\n\t\t\tstrVal(s, \"name\"),\n\t\t\tstrVal(s, \"description\"),\n\t\t})\n\t}\n\tcli.PrintTable(os.Stdout, headers, rows)\n\treturn nil","sourceCodeStart":981,"sourceCodeEnd":1017,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_agent.go#L981-L1017","documentation":"Wrapped error returned when `multica agent skills <id>` (list) fails to GET `/api/agents/{id}/skills`. The wrapped cause is typically 404 for an unknown agent id, 401/403 for auth/permission issues, or a connection failure to the multica server.","triggerScenarios":"Listing skills of a mistyped/deleted agent id, or when the server is unreachable or the token is invalid/expired.","commonSituations":"Auditing agent configurations in scripts where agent ids have churned; stale shell history; CLI pointed at a different workspace than expected.","solutions":["Confirm the agent id with `multica agent list` and retry","Verify the server is running and API URL/token env vars are correct","Treat 403 as a workspace-permission issue — check membership/role","In automation, catch 404 and skip/prune the dead agent id"],"exampleFix":"# before\nmultica agent skills agt_x\n# Error: list agent skills: 404: agent not found\n\n# after\nmultica agent list\nmultica agent skills agt_1","handlingStrategy":"try-catch","validationCode":"multica agent get \"$AGENT_ID\" >/dev/null 2>&1 || { echo 'agent not found'; exit 0; }\nmultica agent skills \"$AGENT_ID\"","typeGuard":null,"tryCatchPattern":"skills, err := fetchAgentSkills(id)\nif err != nil {\n\tif isNotFound(err) { return nil }\n\treturn fmt.Errorf(\"list agent skills: %w\", err)\n}","preventionTips":["Cache agent ids from `agent list` and prune 404s in automation","Use --output json when feeding results to scripts","Check server health before batch listing operations"],"tags":["cli","api","skills","network"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}