zed-industries/zed · error
Failed to read skill file
Error message
Failed to read skill file {}: {} What it means
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.
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
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at crates/agent_ui/src/mention_set.rs:510 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/e8add794ee7fb651.
Report an issue: GitHub.
Appendix: source
Thrown at crates/agent_ui/src/mention_set.rs:510
})
}
fn confirm_mention_for_skill(
&self,
skill_file_path: PathBuf,
cx: &mut Context<Self>,
) -> Task<Result<Mention>> {
// Built-in skills have synthetic paths that don't exist on disk;
// serve their content directly from the compiled-in data.
if let Some(content) = agent_skills::builtin_skill_content(&skill_file_path) {
return Task::ready(Ok(Mention::Text {
content: content.to_string(),
tracked_buffers: Vec::new(),
}));
}
cx.background_spawn(async move {
let content = std::fs::read_to_string(&skill_file_path).map_err(|e| {
anyhow!(
"Failed to read skill file {}: {}",
skill_file_path.display(),
e
)
})?;
Ok(Mention::Text {
content,
tracked_buffers: Vec::new(),
})
})
}
pub fn confirm_mention_for_selection(
&mut self,
source_range: Range<text::Anchor>,
selections: Vec<(Entity<Buffer>, Range<text::Anchor>, Range<usize>)>,
editor: Entity<Editor>,
workspace: WeakEntity<Workspace>,View on GitHub (pinned to f4178619ac)