Hmbown/CodeWhale · error

only Codewhale managed skills can be updated

Error message

only Codewhale managed skills can be updated

What it means

`update_skill` restricts updates to skills whose audit classification is `SkillSourceKind::CodeWhaleManaged`. Imported skills (provenance `import:…`) and other kinds are excluded — imported copies must not hit the remote registry — so updating anything else is rejected.

Solutions

  1. Remove and re-install/re-import the skill so it becomes Codewhale-managed with proper provenance markers, then update.
  2. Restore the missing install/trust marker files so the audit classifies the skill as `CodeWhaleManaged`.
  3. For imported skills, update the external source and re-import instead of using the update path.

Example fix

// before
mutation.execute(Mutation::Update { skill_id: imported_skill_id, .. })?; // rejected
// after
mutation.execute_sync(Mutation::Remove { skill_id: imported_skill_id, .. })?;
mutation.execute_sync(Mutation::ImportExternal { .. })?; // fresh managed install
Defensive patterns

Strategy: validation

Validate before calling

let (skill, _) = find_audited_skill(ctx, &skill_id)?;
if skill.source_kind != SkillSourceKind::CodeWhaleManaged {
    return Err(anyhow!("skill is not Codewhale-managed; re-import to refresh"));
}

Type guard

fn is_managed(skill: &AuditedSkill) -> bool {
    skill.source_kind == SkillSourceKind::CodeWhaleManaged
}

Prevention

When it happens

Trigger: Calling the `Update` mutation on a skill whose `source_kind` is not `CodeWhaleManaged` — e.g. `CompatibleExternal` or an imported copy — even if it sits in a writable owned root.

Common situations: Attempting to update a previously imported skill (its `import:…` provenance makes it non-managed); the audit classifies a skill as external because install/trust marker files are missing or stale after a manual copy.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at crates/tui/src/skills/mutation.rs:867

                continue;
            }
            fs::copy(&path, &target)?;
        }
    }
    Ok(())
}

async fn update_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 update skill outside Codewhale-owned roots");
    }
    if skill.source_kind != SkillSourceKind::CodeWhaleManaged {
        bail!("only Codewhale managed skills can be updated");
    }
    let skills_dir = validate_owned_skill_path(ctx, &skill, &path)?;
    // Imported skills carry `import:…` provenance and must not hit the registry.
    ensure_remote_updatable(&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)?;
    let outcome = install::update_with_registry(
        package_name,
        &skills_dir,
        ctx.max_size,
        ctx.network,

View on GitHub (pinned to 73e0f67d83)