{"record":{"id":"be67335242e5768f","repo":"zeroclaw-labs/zeroclaw","slug":"cli-skills-multiple-locations-bundle","errorCode":"cli-skills-multiple-locations-bundle","errorMessage":"skill '{$name}' exists in multiple locations ({$locations}); pass --bundle to choose one","messagePattern":"skill '(.+?)' exists in multiple locations \\((.+?)\\); pass --bundle to choose one","errorType":"console","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/skills/mod.rs","lineNumber":462,"sourceCode":"                            anyhow::bail!(\"Skill path escapes skills directory: {name}\");\n                        }\n                        std::fs::remove_dir_all(dir)?;\n                        println!(\n                            \"{}\",\n                            get_required_cli_string_with_args(\n                                \"cli-skills-removed-global\",\n                                &[(\"status\", &status), (\"name\", &name)],\n                            )\n                        );\n                    }\n                }\n                many => {\n                    let locs = many\n                        .iter()\n                        .map(|(l, _)| l.clone())\n                        .collect::<Vec<_>>()\n                        .join(\", \");\n                    anyhow::bail!(\n                        \"{}\",\n                        get_required_cli_string_with_args(\n                            \"cli-skills-multiple-locations-bundle\",\n                            &[(\"name\", &name), (\"locations\", &locs)],\n                        )\n                    );\n                }\n            }\n            Ok(())\n        }\n        crate::SkillCommands::Add {\n            name,\n            bundle,\n            description,\n            license,\n            author,\n            version,\n            category,","sourceCodeStart":444,"sourceCodeEnd":480,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/src/skills/mod.rs#L444-L480","documentation":"`skills remove <name>` without --bundle found the same skill name in more than one location — several bundles and/or the global dir. Removal would be ambiguous, so the CLI lists the locations (labels like bundle:<alias> and global) in the error and requires --bundle to pick one. Nothing is deleted when this fires.","triggerScenarios":"A skill installed globally and later also into a bundle; the same catalog skill installed for two agents with different bundles; duplicates left behind after a bundle rename.","commonSituations":"Phased migration from global skills to bundle-managed skills; teams reusing a skill name across bundles; testing a bundle copy while keeping the global original.","solutions":["Pick the location to delete from the labels printed in the error and re-run with --bundle <alias>","Repeat per location until the copies you want gone are removed","Alternatively scope with --agent to restrict the search to that agent's assigned bundles"],"exampleFix":"# before\nzeroclaw skills remove foo        # error: bundle:work, global\n\n# after\nzeroclaw skills remove foo --bundle work","handlingStrategy":"validation","validationCode":"// In automation, always disambiguate explicitly so this branch cannot fire:\n// zeroclaw skills remove foo --bundle <alias>\n// Determine candidate locations first via `zeroclaw skills list` (labels per bundle/global).","typeGuard":null,"tryCatchPattern":"if let Err(e) = cmd().await {\n    if e.to_string().contains(\"multiple locations\") {\n        // parse the locations list from the message and re-run once with --bundle\n    }\n}","preventionTips":["Pass --bundle (or --agent) on every scripted remove","Avoid installing the same skill name globally and into bundles simultaneously","During global→bundle migration, remove the global copy before adding the bundle one"],"tags":["cli","skills","remove","ambiguity","bundles"],"backgroundTag":"ambiguous-reference","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}