{"record":{"id":"4e6c1d9bb5fb35ef","repo":"Hmbown/CodeWhale","slug":"skill-is-not-an-import-candidate","errorCode":null,"errorMessage":"skill is not an import candidate","messagePattern":"skill is not an import candidate","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/skills/mutation.rs","lineNumber":670,"sourceCode":"    }\n    if source_skill.path_unsafe {\n        bail!(\"refusing to import unsafe external skill package\");\n    }\n\n    let owned_snap = scan_with_configured(\n        ctx.workspace,\n        ctx.home,\n        ctx.configured_skills_dir,\n        SkillAuditMode::OwnedOnly,\n        None,\n    );\n    let owned_has_name = owned_snap\n        .skills\n        .iter()\n        .any(|s| s.id.canonical_name == source_id.canonical_name);\n\n    if !owned_has_name && !source_skill.import_candidate {\n        bail!(\"skill is not an import candidate\");\n    }\n\n    let before = verify_expected_digest(&source_path, Some(&expected_digest))?;\n\n    let skills_dir = prepare_owned_target(ctx.workspace, ctx.home, target)?;\n    let anchor = owned_anchor(ctx.workspace, ctx.home, target)?;\n\n    let want_kind = match target {\n        SkillTargetScope::Project => SkillRootKind::CodeWhaleProject,\n        SkillTargetScope::Global => SkillRootKind::CodeWhaleGlobal,\n    };\n    let existing_in_target: Vec<&AuditedSkill> = owned_snap\n        .skills\n        .iter()\n        .filter(|s| s.id.canonical_name == source_id.canonical_name)\n        .filter(|s| s.root.kind == want_kind)\n        .collect();\n","sourceCodeStart":652,"sourceCodeEnd":688,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/skills/mutation.rs#L652-L688","documentation":"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.","triggerScenarios":"Thrown at crates/tui/src/skills/mutation.rs:670 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}