{"record":{"id":"e8add794ee7fb651","repo":"zed-industries/zed","slug":"failed-to-read-skill-file","errorCode":null,"errorMessage":"Failed to read skill file {}: {}","messagePattern":"Failed to read skill file (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent_ui/src/mention_set.rs","lineNumber":510,"sourceCode":"        })\n    }\n\n    fn confirm_mention_for_skill(\n        &self,\n        skill_file_path: PathBuf,\n        cx: &mut Context<Self>,\n    ) -> Task<Result<Mention>> {\n        // Built-in skills have synthetic paths that don't exist on disk;\n        // serve their content directly from the compiled-in data.\n        if let Some(content) = agent_skills::builtin_skill_content(&skill_file_path) {\n            return Task::ready(Ok(Mention::Text {\n                content: content.to_string(),\n                tracked_buffers: Vec::new(),\n            }));\n        }\n        cx.background_spawn(async move {\n            let content = std::fs::read_to_string(&skill_file_path).map_err(|e| {\n                anyhow!(\n                    \"Failed to read skill file {}: {}\",\n                    skill_file_path.display(),\n                    e\n                )\n            })?;\n            Ok(Mention::Text {\n                content,\n                tracked_buffers: Vec::new(),\n            })\n        })\n    }\n\n    pub fn confirm_mention_for_selection(\n        &mut self,\n        source_range: Range<text::Anchor>,\n        selections: Vec<(Entity<Buffer>, Range<text::Anchor>, Range<usize>)>,\n        editor: Entity<Editor>,\n        workspace: WeakEntity<Workspace>,","sourceCodeStart":492,"sourceCodeEnd":528,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/agent_ui/src/mention_set.rs#L492-L528","documentation":"Raised by confirm_mention_for_skill when reading the mentioned SKILL.md from disk fails (the built-in content lookup already missed, so this is a user skill path). The offending input is skill_file_path plus the underlying IO error {e} — usually the file was deleted, moved, or is unreadable since the mention was created.","triggerScenarios":"Thrown at crates/agent_ui/src/mention_set.rs:510 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the skill file still exists at the mentioned path","Reinstall or re-download the skill if its files were removed","Re-create the skill mention after restoring the file"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}