zed-industries/zed · error
A skill named \"{name}\" already exists at {}. Pick a differ
Error message
A skill named \"{name}\" already exists at {}. Pick a different name. What it means
Raised in write_skill_to_disk when fs.metadata reports an existing directory at <skills_dir>/<name>. Import/save refuses to overwrite an existing skill with the same name; the existing directory path is shown so the user can pick a different name.
Source
Thrown at crates/settings_ui/src/pages/skill_creator.rs:1202
}
/// Serialize the SKILL.md file to disk at `<skills_dir>/<name>/SKILL.md`.
///
/// Refuses to overwrite an existing directory at `<skills_dir>/<name>`. The
/// caller surfaces the resulting error to the user, who picks a different
/// name.
async fn write_skill_to_disk(
fs: &dyn Fs,
skills_dir: &std::path::Path,
name: &str,
description: &str,
body: &str,
disable_model_invocation: bool,
) -> Result<PathBuf> {
let skill_dir = skills_dir.join(name);
match fs.metadata(&skill_dir).await {
Ok(Some(metadata)) if metadata.is_dir => {
anyhow::bail!(
"A skill named \"{name}\" already exists at {}. Pick a different name.",
skill_dir.display()
);
}
Ok(Some(_)) => {
// Something exists at this path, but it isn't a directory — e.g.
// a stray file the user (or another tool) left there. Without
// this branch we'd fall through to `create_dir`, which on the
// real fs returns a generic "File exists" IO error that gives
// the user no idea what's wrong or how to recover.
anyhow::bail!(
"A file (not a skill directory) already exists at {}. \
Delete it or pick a different skill name.",
skill_dir.display()
);
}
Ok(None) => {}
Err(err) => {View on GitHub (pinned to 9d272b0363)
Solutions
- Pick a different skill name in the creator form
- Delete or rename the existing skill directory first
- Edit the existing skill in place instead of creating a new one
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/settings_ui/src/pages/skill_creator.rs:1208 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20).
Data as JSON: /api/errors/a196e70ed211c6f2.
Report an issue: GitHub.