{"record":{"id":"5499b46925776202","repo":"Hmbown/CodeWhale","slug":"skill-was-imported-locally-spec-spec-and-can","errorCode":null,"errorMessage":"skill was imported locally (spec '{spec}') and cannot be updated from a registry; re-import or remove it first","messagePattern":"skill was imported locally \\(spec '(.+?)'\\) and cannot be updated from a registry; re-import or remove it first","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/skills/mutation.rs","lineNumber":580,"sourceCode":"            \"skill content changed since audit (expected {expected}, found {current}); \\\n             re-review before mutating\"\n        );\n    }\n    Ok(Some(current))\n}\n\nfn ensure_remote_updatable(skill_dir: &Path) -> Result<()> {\n    let marker_path = skill_dir.join(install::INSTALLED_FROM_MARKER);\n    let body = fs::read_to_string(&marker_path)\n        .with_context(|| format!(\"failed to read {}\", marker_path.display()))?;\n    let value: serde_json::Value = serde_json::from_str(&body)\n        .with_context(|| format!(\"malformed {}\", install::INSTALLED_FROM_MARKER))?;\n    let spec = value\n        .get(\"spec\")\n        .and_then(|v| v.as_str())\n        .unwrap_or_default();\n    if !install::is_registry_updatable_spec(spec) {\n        bail!(\n            \"skill was imported locally (spec '{spec}') and cannot be updated from a registry; \\\n             re-import or remove it first\"\n        );\n    }\n    Ok(())\n}\n\nasync fn install_remote(\n    source: InstallSource,\n    target: SkillTargetScope,\n    ctx: &MutationContext<'_>,\n) -> Result<SkillMutationReceipt> {\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 outcome = install::install_with_registry(\n        source,\n        &skills_dir,","sourceCodeStart":562,"sourceCodeEnd":598,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/skills/mutation.rs#L562-L598","documentation":"Before updating a skill from a registry, the library reads the INSTALLED_FROM marker written at import time and checks that its spec is registry-updatable. If the skill was imported from a local path (or the spec is empty/non-registry), there is no registry source to update from, so the update is refused with guidance to re-import or remove first.","triggerScenarios":"Calling update_skill (or a name-based Update) on a skill whose .codewhale install marker has a spec that is_registry_updatable_spec rejects — e.g. spec \"file:///path/to/skill\", a bare local path, or a missing/empty spec field.","commonSituations":"User imported a skill from a local folder during development and later runs the update command expecting a registry refresh; a marker file written by an older version lacks the spec field; the marker was hand-edited into a non-registry value.","solutions":["Remove the locally imported skill and install it from the registry if a registry version exists","Re-import the updated local copy from its source path instead of using update","Check the INSTALLED_FROM marker's spec field; if it is empty or malformed, re-import to rewrite it correctly","If the skill is published to a registry now, re-install from the registry once so the marker records an updatable spec"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"fn is_registry_updatable(install_dir: &Path) -> std::io::Result<bool> {\n    let marker = install_dir.join(install::INSTALLED_FROM_MARKER);\n    let value: serde_json::Value = serde_json::from_str(&std::fs::read_to_string(marker)?)?;\n    let spec = value.get(\"spec\").and_then(|v| v.as_str()).unwrap_or_default();\n    Ok(install::is_registry_updatable_spec(spec))\n}","typeGuard":"fn updatable_spec(marker: &MarkerFile) -> Option<&str> {\n    let spec = marker.spec.as_str()?;\n    install::is_registry_updatable_spec(spec).then_some(spec)\n}","tryCatchPattern":"match mutation::execute(update_request, &ctx).await {\n    Err(e) if e.to_string().contains(\"imported locally\") => {\n        eprintln!(\"local import: re-import from source or remove, then install from registry\");\n    }\n    other => other?,\n}","preventionTips":["Check the INSTALLED_FROM marker's spec before offering update on a skill","Use registry installs for skills you intend to keep updated; use local import only for one-off or dev copies","Re-import after hand-editing or migrating skill directories so the marker is rewritten correctly"],"tags":["skills","update","registry","local-import"],"backgroundTag":"unsupported-operation","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}