Hmbown/CodeWhale · error · anyhow::Error
skill is not an import candidate
Error message
skill is not an import candidate
What it means
Raised in import_external when no owned package with the same canonical name exists and the audited source's import_candidate flag is false. The audit only marks skills as import candidates when they advertise a skill manifest the importer understands; this guard blocks copying arbitrary external directories that were never declared importable.
Source
Thrown at crates/tui/src/skills/mutation.rs:670
}
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 {
bail!("skill is not an import candidate");
}
let before = verify_expected_digest(&source_path, Some(&expected_digest))?;
let skills_dir = prepare_owned_target(ctx.workspace, ctx.home, target)?;
let anchor = owned_anchor(ctx.workspace, ctx.home, target)?;
let want_kind = match target {
SkillTargetScope::Project => SkillRootKind::CodeWhaleProject,
SkillTargetScope::Global => SkillRootKind::CodeWhaleGlobal,
};
let existing_in_target: Vec<&AuditedSkill> = owned_snap
.skills
.iter()
.filter(|s| s.id.canonical_name == source_id.canonical_name)
.filter(|s| s.root.kind == want_kind)
.collect();
View on GitHub (pinned to 0c42157ee5)
Solutions
- Ensure the external skill package includes a valid manifest (SKILL.md / metadata) so the audit marks it import_candidate
- If an owned package of the same canonical name already exists, import may proceed to replace it; otherwise the source must qualify first
- Verify you are importing the audited directory you intended, not a sibling that failed audit
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/skills/mutation.rs:670 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/4e6c1d9bb5fb35ef.
Report an issue: GitHub.