zeroclaw-labs/zeroclaw · error · anyhow::Error

cli-bundle-not-configured

cli-bundle-not-configured

Error message

skill bundle '{$alias}' is not configured

What it means

`skills install --bundle <alias>` checks the alias against the top-level skill_bundles map before resolving its directory; an alias that is not configured bails with cli-bundle-not-configured and nothing is written. The explicit --bundle branch wins outright, so this check is the first thing that runs for that flag.

Source

Thrown at src/skills/mod.rs:594

    bundle: Option<&str>,
) -> Result<SkillLocation> {
    let install_root = config.install_root_dir();

    // Validate an explicit --agent up front, so a typo'd alias errors even when
    // --bundle is also given (which otherwise returns before the agent block).
    if let Some(a) = agent
        && config.agent(a).is_none()
    {
        anyhow::bail!(
            "{}",
            get_required_cli_string_with_args("cli-skills-agent-not-configured", &[("alias", a)],)
        );
    }

    // 1. An explicit bundle wins outright (mirrors `skills add`/`edit`).
    if let Some(alias) = bundle {
        if !config.skill_bundles.contains_key(alias) {
            anyhow::bail!(
                "{}",
                get_required_cli_string_with_args("cli-bundle-not-configured", &[("alias", alias)])
            );
        }
        let dir = zeroclaw_config::skill_bundles::resolve_directory(config, &install_root, alias)
            .map_err(anyhow::Error::msg)?;
        return Ok(SkillLocation::Bundle {
            alias: alias.to_string(),
            dir,
        });
    }

    // 2. Pick the target agent: explicit `--agent`, else the active agent.
    let target_agent: Option<String> = match agent {
        Some(a) => Some(a.to_string()),
        None => config.resolved_runtime_agent_alias().map(str::to_string),
    };

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. List configured bundles (`zeroclaw skills bundle list`) and use the exact alias
  2. Create the bundle first: `zeroclaw skills bundle add <alias>`
  3. Install without --bundle to fall back to the agent's bundle or the global dir
  4. Quote the alias in scripts to avoid shell expansion

Example fix

# before
zeroclaw skills install ./my-skill --bundle team

# after
zeroclaw skills bundle add team
zeroclaw skills install ./my-skill --bundle team
Defensive patterns

Strategy: validation

Validate before calling

if let Some(alias) = bundle {
    if !config.skill_bundles.contains_key(alias) {
        eprintln!("bundle '{alias}' not configured; run: zeroclaw skills bundle add {alias}");
        return;
    }
}

Prevention

When it happens

Trigger: --bundle typo or case mismatch; the bundle was renamed or removed earlier; the [skill_bundles] entry lives in a different config file that is not active.

Common situations: Team docs referencing bundles not present in a new clone; renaming bundles without updating install scripts; fresh environments where `skills bundle add` was never run.

Related errors


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/77bfc40c451fcd2a. Report an issue: GitHub.