Hmbown/CodeWhale · error · anyhow::Error
import source must be a compatible external skill
Error message
import source must be a compatible external skill
What it means
Raised in import_external when the audited source skill's source_kind is not CompatibleExternal. The import flow only copies skills that the audit scanner classified as compatible external packages (e.g. externally installed skill directories); importing a built-in, managed, or otherwise classified skill is rejected by this guard on the AuditedSkillId's source_kind field.
Source
Thrown at crates/tui/src/skills/mutation.rs:651
scope: target.as_skill_scope(),
safe_target_path: safe_display_path(&skills_dir, Some(ctx.workspace), ctx.home),
before_digest: None,
after_digest: None,
outcome: SkillMutationOutcome::NetworkDenied(host),
}),
}
}
fn import_external(
source_id: AuditedSkillId,
expected_digest: String,
target: SkillTargetScope,
conflict_policy: ConflictPolicy,
ctx: &MutationContext<'_>,
) -> Result<SkillMutationReceipt> {
let (source_skill, source_path) = find_audited_skill(ctx, &source_id)?;
if source_skill.source_kind != SkillSourceKind::CompatibleExternal {
bail!("import source must be a compatible external skill");
}
if source_skill.path_unsafe {
bail!("refusing to import unsafe external skill package");
}
let owned_snap = scan_with_configured(
ctx.workspace,
ctx.home,
ctx.configured_skills_dir,
SkillAuditMode::OwnedOnly,
None,
);
let owned_has_name = owned_snap
.skills
.iter()
.any(|s| s.id.canonical_name == source_id.canonical_name);
if !owned_has_name && !source_skill.import_candidate {View on GitHub (pinned to 0c42157ee5)
Solutions
- Pass an AuditedSkillId whose audit entry reports SkillSourceKind::CompatibleExternal
- Re-run the skill audit/scan so the source is classified from its current on-disk location
- Use the appropriate flow (update/trust) instead of import for managed or owned skills
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/skills/mutation.rs:651 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/d3d42cd0c348e3c4.
Report an issue: GitHub.