Hmbown/CodeWhale · error
skill ' ' exists only in a compatible external root; import…
Error message
skill '{name}' exists only in a compatible external root; import it with /skills (refusing to write external harness directories) What it means
When resolving a skill by name for an owned-root mutation, the library found the skill only under a CompatibleExternal root (a directory owned by another harness that Codewhale can read but never write). To keep the guarantee that Codewhale never writes into external harness directories, the mutation is refused and the user is told to import the skill into an owned root first.
Solutions
- Import the skill into a Codewhale-owned root first with /skills (import), then run the mutation against the imported copy
- Target the mutation explicitly at a project or global scope after importing
- If you want to remove the external copy, delete it with the external tool that owns that directory — Codewhale will not write there
Defensive patterns
Strategy: validation
Validate before calling
fn skill_exists_in_owned_roots(catalog: &SkillCatalog, name: &str) -> bool {
let canonical = canonicalize_name(name);
catalog.owned_writable_roots().iter().any(|r| {
r.skills.iter().any(|s|
s.id.canonical_name == canonical
&& s.source_kind != SkillSourceKind::CompatibleExternal)
})
} Try / catch
match mutation::execute_sync(request, &ctx) {
Err(e) if e.to_string().contains("compatible external root") => {
eprintln!("import the skill with /skills first, then retry the mutation");
}
other => other?,
} Prevention
- Check the skill's source_kind before mutating; external copies must be imported first
- Keep skill names normalized so owned copies are found before external ones matter
- Document that Codewhale never writes into external harness directories
When it happens
Trigger: Calling execute/execute_sync (remove, update, trust) with a name-based request where the catalog scan finds the skill exclusively with source_kind == SkillSourceKind::CompatibleExternal; e.g. uninstalling a skill that lives in an external editor's skills directory.
Common situations: User installed a skill via another tool (external harness directory) and then tries `codewhale` remove/update/trust on it by name; a name collision check finds the external copy only; project/global Codewhale roots are empty for that name.
Understand the failure class
Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.
Related errors
- destination already exists with different content
- import source must be a compatible external skill
- refusing to mutate non-owned root
- skill ' ' has multiple owned packages in the target scope…
- skill is not an import candidate
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/5df505992bd2629d.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/skills/mutation.rs:493
};
matches.retain(|s| s.root.kind == want);
}
match matches.as_slice() {
[] => {
// If the name only exists externally, tell the user to import.
let compatible = scan_with_configured(
ctx.workspace,
ctx.home,
ctx.configured_skills_dir,
SkillAuditMode::Compatible,
None,
);
if compatible.skills.iter().any(|s| {
s.id.canonical_name == canonical
&& s.source_kind == SkillSourceKind::CompatibleExternal
}) {
bail!(
"skill '{name}' exists only in a compatible external root; \
import it with /skills (refusing to write external harness directories)"
);
}
bail!("skill '{name}' not found in Codewhale-owned project/global roots");
}
[only] => {
let DigestState::Known(digest) = &only.digest else {
bail!("skill '{name}' has unknown package digest; refusing mutation");
};
Ok(ResolvedOwnedSkill {
id: only.id.clone(),
digest: digest.clone(),
})
}
_ => bail!(
"skill '{name}' exists in both project and global Codewhale roots; \
specify --project or --global"View on GitHub (pinned to 73e0f67d83)