Hmbown/CodeWhale · error

skill ' ' is not installed at

Error message

skill '{name}' is not installed at {}

What it means

`uninstall` verifies the skill directory actually exists at `skills_dir/<name>` before deleting. If nothing is at that path there is nothing to remove, so it errors instead of silently succeeding. Note this is the plain path-missing case; a directory that exists but lacks the `.installed-from` marker raises `NotInstalledHere` instead.

Solutions

  1. Check `skills_dir.join(name).exists()` before calling, or treat this as a no-op
  2. Pass the same `skills_dir` used at install time
  3. Verify the skill name spelling

Example fix

// before
uninstall("my-skill", &skills_dir)?; // panics/errors if absent
// after
if skills_dir.join("my-skill").exists() {
    uninstall("my-skill", &skills_dir)?;
}
Defensive patterns

Strategy: validation

Validate before calling

if !skills_dir.join(name).exists() { return Ok(()); } // treat as already uninstalled

Try / catch

if let Err(e) = uninstall(name, &skills_dir) {
    if !e.to_string().contains("is not installed") { return Err(e); }
}

Prevention

When it happens

Trigger: Calling `uninstall(name, skills_dir)` where `skills_dir.join(name)` does not exist — wrong skills dir, skill never installed, already removed, or name typo.

Common situations: Uninstalling a bundled/system skill by name when only community skills live in `skills_dir`; running uninstall twice; pointing at the wrong `--skills-dir` in scripts.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/dc7f3bc2d2b8017c. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/skills/install.rs:509

            }
        }
        InstallOutcome::NeedsApproval(_) | InstallOutcome::NetworkDenied(_) => {}
    }
    match outcome {
        InstallOutcome::Installed(installed) => Ok(UpdateResult::Updated(installed)),
        InstallOutcome::NeedsApproval(host) => Ok(UpdateResult::NeedsApproval(host)),
        InstallOutcome::NetworkDenied(host) => Ok(UpdateResult::NetworkDenied(host)),
    }
}

/// Remove a community-installed skill.
///
/// Refuses to touch any directory that doesn't carry the `.installed-from`
/// marker — that's our cue that it's user-owned and not a system skill.
pub fn uninstall(name: &str, skills_dir: &Path) -> Result<()> {
    let target = skill_target_path(name, skills_dir)?;
    if !target.exists() {
        bail!("skill '{name}' is not installed at {}", target.display());
    }
    ensure_target_within_skills_dir(&target, skills_dir)?;
    if !target.join(INSTALLED_FROM_MARKER).exists() {
        return Err(InstallError::NotInstalledHere(name.to_string()).into());
    }
    fs::remove_dir_all(&target)
        .with_context(|| format!("failed to remove {}", target.display()))?;
    Ok(())
}

/// Mark a community-installed skill as trusted, binding the marker to the
/// current package content digest (schema v2).
///
/// Refuses to mark system skills (no `.installed-from`) so the bundled
/// `skill-creator` doesn't accidentally inherit elevated tool privileges.
#[cfg(test)]
pub fn trust(name: &str, skills_dir: &Path) -> Result<()> {
    let target = skill_target_path(name, skills_dir)?;

View on GitHub (pinned to 73e0f67d83)