zed-industries/zed · error

Skill description cannot be empty

Error message

Skill description cannot be empty

What it means

Validation in recompute_description_error(): the skill description is empty, and a non-empty description is required to create or save a skill.

Source

Thrown at crates/settings_ui/src/pages/skill_creator.rs:406

        self.body_editor.read(cx).text(cx)
    }

    fn current_url(&self, cx: &App) -> String {
        self.url_editor.read(cx).text(cx)
    }

    fn recompute_name_error(&mut self, cx: &mut Context<Self>) {
        let name = self.current_name(cx);
        let error = validate_name(&name).err();
        self.name_error = error;
        self.name_editor
            .update(cx, |field, cx| field.set_error(error, cx));
    }

    fn recompute_description_error(&mut self, cx: &mut Context<Self>) {
        let description = self.current_description(cx);
        self.description_length = description.len();
        let error = validate_description(&description).err();
        self.description_error = error;
        self.description_editor
            .update(cx, |field, cx| field.set_error(error, cx));
    }

    fn recompute_body_error(&mut self, cx: &App) {
        let body = self.current_body(cx);
        self.body_error = if body.trim().is_empty() {
            Some("Body is required.")
        } else {
            None
        };
    }

    fn is_valid(&self, cx: &App) -> bool {
        validate_name(&self.current_name(cx)).is_ok()
            && validate_description(&self.current_description(cx)).is_ok()
            && !self.current_body(cx).trim().is_empty()

View on GitHub (pinned to f4178619ac)

Solutions

  1. Write a description before saving
  2. Disable save until the description is non-empty
  3. Show the inline error under the description field
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/settings_ui/src/pages/skill_creator.rs:406 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/9f04055571bbe9fa. Report an issue: GitHub.