Hmbown/CodeWhale · error · anyhow::Error
only CodeWhale managed skills can be removed
Error message
only CodeWhale managed skills can be removed
What it means
Raised in remove_skill when the skill's source_kind is not CodeWhaleManaged. Only skills CodeWhale manages may be removed through this API; external or user-authored skills are deliberately protected from deletion by the tool even when they live in an owned root.
Source
Thrown at crates/tui/src/skills/mutation.rs:945
safe_target_path: safe_display_path(&path, Some(ctx.workspace), ctx.home),
before_digest: before,
after_digest: None,
outcome: SkillMutationOutcome::NetworkDenied(host),
}),
}
}
fn remove_skill(
skill_id: AuditedSkillId,
expected_digest: Option<String>,
ctx: &MutationContext<'_>,
) -> Result<SkillMutationReceipt> {
let (skill, path) = find_audited_skill(ctx, &skill_id)?;
if !skill.root.is_writable_owned() {
bail!("refusing to remove skill outside CodeWhale-owned roots");
}
if skill.source_kind != SkillSourceKind::CodeWhaleManaged {
bail!("only CodeWhale managed skills can be removed");
}
let skills_dir = validate_owned_skill_path(ctx, &skill, &path)?;
let before = verify_expected_digest(&path, expected_digest.as_deref())?;
let scope = match skill.root.kind {
SkillRootKind::CodeWhaleProject => SkillScope::Project,
SkillRootKind::CodeWhaleGlobal => SkillScope::Global,
_ => SkillScope::Logical,
};
let package_name = on_disk_package_name(&skill_id)?;
validate_owned_skill_path(ctx, &skill, &path)?;
install::uninstall(package_name, &skills_dir)?;
Ok(SkillMutationReceipt {
action: SkillActionKind::Remove,
name: skill_id.canonical_name,
scope,
safe_target_path: safe_display_path(&path, Some(ctx.workspace), ctx.home),
before_digest: before,
after_digest: None,View on GitHub (pinned to 0c42157ee5)
Solutions
- Delete non-managed skills manually or via their source tool
- Verify the AuditedSkillId refers to the managed copy you intend to remove
- Use import with a replace policy to supersede rather than remove
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/skills/mutation.rs:945 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/970bf9f8442863ab.
Report an issue: GitHub.