zeroclaw-labs/zeroclaw · error · anyhow::Error
cli-skills-multiple-locations-bundle
cli-skills-multiple-locations-bundle
Error message
skill '{$name}' exists in multiple locations ({$locations}); pass --bundle to choose one What it means
`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.
Source
Thrown at src/skills/mod.rs:462
anyhow::bail!("Skill path escapes skills directory: {name}");
}
std::fs::remove_dir_all(dir)?;
println!(
"{}",
get_required_cli_string_with_args(
"cli-skills-removed-global",
&[("status", &status), ("name", &name)],
)
);
}
}
many => {
let locs = many
.iter()
.map(|(l, _)| l.clone())
.collect::<Vec<_>>()
.join(", ");
anyhow::bail!(
"{}",
get_required_cli_string_with_args(
"cli-skills-multiple-locations-bundle",
&[("name", &name), ("locations", &locs)],
)
);
}
}
Ok(())
}
crate::SkillCommands::Add {
name,
bundle,
description,
license,
author,
version,
category,View on GitHub (pinned to 88bb9c8533)
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
Example fix
# before zeroclaw skills remove foo # error: bundle:work, global # after zeroclaw skills remove foo --bundle work
Defensive patterns
Strategy: validation
Validate before calling
// In automation, always disambiguate explicitly so this branch cannot fire: // zeroclaw skills remove foo --bundle <alias> // Determine candidate locations first via `zeroclaw skills list` (labels per bundle/global).
Try / catch
if let Err(e) = cmd().await {
if e.to_string().contains("multiple locations") {
// parse the locations list from the message and re-run once with --bundle
}
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- cli-skills-agent-multiple-bundles
- Skill not found: {name}
- Skill path escapes skills directory: {name}
- cli-bundle-not-configured
- cli-skills-multiple-locations-path
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/be67335242e5768f.
Report an issue: GitHub.