{"record":{"id":"1614eb75d6abd68f","repo":"Hmbown/CodeWhale","slug":"skill-is-registered-at-but-that-file-no-longer-exists-on","errorCode":null,"errorMessage":"Skill `{}` is registered at {} but that file no longer exists on disk, so the skill did not load. Restore the file, or fix the skills directory it came from (`skills_dir` in config.toml, `$CODEWHALE_HOME`, or the OS home) — the path above shows exactly where the runtime looked.","messagePattern":"Skill `(.+?)` is registered at (.+?) but that file no longer exists on disk, so the skill did not load\\. Restore the file, or fix the skills directory it came from \\(`skills_dir` in config\\.toml, `\\$CODEWHALE_HOME`, or the OS home\\) — the path above shows exactly where the runtime looked\\.","errorType":"error_code","errorClass":"ToolError","httpStatus":null,"severity":"error","filePath":"crates/tui/src/tools/skill.rs","lineNumber":200,"sourceCode":"}\n\n/// A native registry entry whose SKILL.md vanished from disk after discovery\n/// (deleted, or resolved under a wrong home directory) must fail loudly with\n/// the exact path — never silently serve the stale cached body while the user\n/// believes the skill loaded (§2.5).\nfn ensure_native_skill_file_present(skill: &Skill) -> Result<(), ToolError> {\n    if !matches!(skill.source, SkillSource::Native) || skill.path.is_file() {\n        return Ok(());\n    }\n    let message = format!(\n        \"Skill `{}` is registered at {} but that file no longer exists on disk, \\\n         so the skill did not load. Restore the file, or fix the skills directory it \\\n         came from (`skills_dir` in config.toml, `$CODEWHALE_HOME`, or the OS home) — \\\n         the path above shows exactly where the runtime looked.\",\n        skill.name,\n        skill.path.display()\n    );\n    crate::logging::warn(&message);\n    Err(ToolError::execution_failed(message))\n}\n\nfn ensure_reviewed_plugin_skill_is_current(\n    skill: &Skill,\n    workspace: &std::path::Path,\n) -> Result<(), ToolError> {\n    let SkillSource::Plugin {\n        plugin_name,\n        authority,\n        ..\n    } = &skill.source\n    else {\n        return Ok(());\n    };\n\n    if authority.workspace != workspace {\n        return Err(ToolError::execution_failed(format!(","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/tools/skill.rs#L182-L218","documentation":"ensure_native_skill_file_present checks that a registered skill's backing file still exists on disk before use. If the skill registry entry points to a file that has vanished, it logs a warning and returns ToolError::execution_failed with this message, so the failure is loud rather than a silent no-op.","triggerScenarios":"Invoking a skill (execute) whose Skill.path no longer exists — e.g. the skills_dir contents were deleted/moved after registration, or the resolved path from skills_dir/$CODEWHALE_HOME/home changed between sessions.","commonSituations":"Deleted or moved skills directory; config.toml `skills_dir` pointing at a path that no longer exists; $CODEWHALE_HOME changed; syncing tool (dotfiles manager) removed the file; invoking a skill in a fresh machine/container where the file wasn't copied.","solutions":["Restore the skill file at the exact path shown in the message (skill.path)","Fix `skills_dir` in config.toml (or set $CODEWHALE_HOME / ensure the OS home) so it points at the directory that actually contains the skill files, then restart","Re-install or re-download the missing skill into the configured skills directory"],"exampleFix":"# before\nskills_dir = \"/home/user/old-dotfiles/skills\"\n# after\nskills_dir = \"/home/user/dotfiles/skills\"","handlingStrategy":"validation","validationCode":"// before invoking a skill\nlet skills_dir = std::env::var(\"CODEWHALE_HOME\").map(|h| std::path::PathBuf::from(h).join(\"skills\")).unwrap_or_else(|_| dirs::home_dir().unwrap().join(\".codewhale/skills\"));\nassert!(skills_dir.is_dir(), \"skills_dir missing: {}\", skills_dir.display());\nfor f in std::fs::read_dir(&skills_dir).unwrap() {\n    println!(\"skill file: {}\", f.unwrap().path().display());\n}","typeGuard":null,"tryCatchPattern":"match tool.execute(skill_invocation) {\n    Err(ToolError::ExecutionFailed(msg)) if msg.contains(\"no longer exists on disk\") => {\n        // restore the file at the path embedded in msg or fix skills_dir, then retry\n        eprintln!(\"skill file missing: {msg}\");\n    }\n    Err(e) => return Err(e.into()),\n    Ok(r) => { /* use r */ }\n}","preventionTips":["Keep skill files under a stable, version-controlled skills directory","Point skills_dir at an absolute path that survives home-directory moves","Re-check $CODEWHALE_HOME after environment or container changes","Restore dotfiles/skills via your sync tool before launching the TUI"],"tags":["skills","file-not-found","plugin"],"backgroundTag":"file-not-found","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"}