{"record":{"id":"19886c667244dab9","repo":"zed-industries/zed","slug":"skill-name-must-not-start-or-end-with-a-hyphen","errorCode":null,"errorMessage":"Skill name must not start or end with a hyphen","messagePattern":"Skill name must not start or end with a hyphen","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/settings_ui/src/pages/skill_creator.rs","lineNumber":397,"sourceCode":"    fn current_name(&self, cx: &App) -> String {\n        self.name_editor.read(cx).text(cx)\n    }\n\n    fn current_description(&self, cx: &App) -> String {\n        self.description_editor.read(cx).text(cx)\n    }\n\n    fn current_body(&self, cx: &App) -> String {\n        self.body_editor.read(cx).text(cx)\n    }\n\n    fn current_url(&self, cx: &App) -> String {\n        self.url_editor.read(cx).text(cx)\n    }\n\n    fn recompute_name_error(&mut self, cx: &mut Context<Self>) {\n        let name = self.current_name(cx);\n        let error = validate_name(&name).err();\n        self.name_error = error;\n        self.name_editor\n            .update(cx, |field, cx| field.set_error(error, cx));\n    }\n\n    fn recompute_description_error(&mut self, cx: &mut Context<Self>) {\n        let description = self.current_description(cx);\n        self.description_length = description.chars().count();\n        let error = validate_description(&description).err();\n        self.description_error = error;\n        self.description_editor\n            .update(cx, |field, cx| field.set_error(error, cx));\n    }\n\n    fn recompute_body_error(&mut self, cx: &App) {\n        let body = self.current_body(cx);\n        self.body_error = if body.trim().is_empty() {\n            Some(\"Body is required.\")","sourceCodeStart":379,"sourceCodeEnd":415,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/settings_ui/src/pages/skill_creator.rs#L379-L415","documentation":"Returned by validate_name when the skill name starts or ends with a hyphen ('-'). Leading/trailing hyphens produce invalid/awkward directory names, so the field error is set and saving is blocked until the name is trimmed of hyphens.","triggerScenarios":"Thrown at crates/settings_ui/src/pages/skill_creator.rs:397 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}