{"record":{"id":"695b31db94b21f19","repo":"Hmbown/CodeWhale","slug":"skill-name-was-imported-locally-spec-an","errorCode":null,"errorMessage":"skill '{name}' was imported locally (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":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/skills/install.rs","lineNumber":453,"sourceCode":"    max_size: u64,\n    network: &NetworkPolicy,\n    registry_url: &str,\n) -> Result<UpdateResult> {\n    let target = skill_target_path(name, skills_dir)?;\n    if tokio::fs::try_exists(&target).await.unwrap_or(false) {\n        ensure_target_within_skills_dir(&target, skills_dir)?;\n    }\n    let marker_path = target.join(INSTALLED_FROM_MARKER);\n    if !tokio::fs::try_exists(&marker_path).await.unwrap_or(false) {\n        return Err(InstallError::NotInstalledHere(name.to_string()).into());\n    }\n    let marker_body = tokio::fs::read_to_string(&marker_path)\n        .await\n        .with_context(|| format!(\"failed to read {}\", marker_path.display()))?;\n    let marker: InstalledFromMarker = serde_json::from_str(&marker_body)\n        .with_context(|| format!(\"malformed {INSTALLED_FROM_MARKER} for {name}\"))?;\n    if !is_registry_updatable_spec(&marker.spec) {\n        bail!(\n            \"skill '{name}' was imported locally (spec '{}') and cannot be updated from a registry; \\\n             re-import or remove it first\",\n            marker.spec\n        );\n    }\n\n    // Re-resolve the URL, taking the existing checksum as a short-circuit hint:\n    // we still hit the network so the user gets a useful \"no upstream change\"\n    // signal, but we skip the unpack step if the bytes match.\n    let source = InstallSource::parse(&marker.spec)?;\n    let urls = match candidate_urls(&source, network, registry_url).await? {\n        UrlResolution::Resolved(urls) => urls,\n        UrlResolution::NeedsApproval(host) => return Ok(UpdateResult::NeedsApproval(host)),\n        UrlResolution::Denied(host) => return Ok(UpdateResult::NetworkDenied(host)),\n    };\n    let (bytes, _url) = match download_first_success(&urls, network, max_size).await? {\n        DownloadOutcome::Bytes { bytes, url } => (bytes, url),\n        DownloadOutcome::NeedsApproval(host) => return Ok(UpdateResult::NeedsApproval(host)),","sourceCodeStart":435,"sourceCodeEnd":471,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/skills/install.rs#L435-L471","documentation":"`update_with_registry` refuses to update a skill whose `.installed-from` marker records a locally imported source (e.g. a local directory) rather than a registry-updatable spec. Registry updates only make sense for specs the registry can re-fetch; local imports have no upstream artifact. The user must re-import the skill locally or remove it and install it from a registry.","triggerScenarios":"Calling `update_with_registry(name, ...)` (or `update(name, ...)`) on a skill whose `.installed-from` marker spec fails `is_registry_updatable_spec` — i.e. the skill was placed via local import, not registry/GitHub/tarball install.","commonSituations":"User imported a skill from a local folder with `skills import`, then later runs the update command for it; skills synced between machines whose marker records a machine-local path; a registry was later added and the user assumes all skills update from it.","solutions":["Remove the locally imported skill (`uninstall`) and install it from the registry so it has an updatable spec","Re-import the skill locally from the newer local source instead of updating","Edit the `.installed-from` marker to a registry-updatable spec only if you truly know the upstream provenance"],"exampleFix":"// before\nupdate(\"my-skill\", &skills_dir, MAX, &network).await?; // fails: imported locally\n// after\nuninstall(\"my-skill\", &skills_dir)?;\ninstall(\"registry:my-skill\", &skills_dir, MAX, &network, false).await?;\nupdate(\"my-skill\", &skills_dir, MAX, &network).await?;","handlingStrategy":"validation","validationCode":"fn is_locally_imported(marker_body: &str) -> bool {\n    let spec = serde_json::from_str::<InstalledFromMarker>(marker_body).map(|m| m.spec).unwrap_or_default();\n    !is_registry_updatable_spec(&spec)\n}","typeGuard":null,"tryCatchPattern":"match update(name, &skills_dir, MAX, &network).await {\n    Err(e) if e.to_string().contains(\"imported locally\") => reimport_or_remove(name)?,\n    other => other?,\n}","preventionTips":["Prefer registry installs so skills carry an updatable spec","Track locally imported skills separately and never batch-update them","Re-import from the local source instead of running update"],"tags":["skills","registry","state"],"backgroundTag":"invalid-state-transition","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"}