{"record":{"id":"91d7d919e2633355","repo":"zeroclaw-labs/zeroclaw","slug":"no-editor-found-set-visual-or-editor","errorCode":null,"errorMessage":"no editor found; set VISUAL or EDITOR","messagePattern":"no editor found; set VISUAL or EDITOR","errorType":"console","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/skills/mod.rs","lineNumber":1233,"sourceCode":"    {\n        return Ok(d);\n    }\n    if std::io::IsTerminal::is_terminal(&std::io::stdin()) {\n        let prompt: String = dialoguer::Input::new()\n            .with_prompt(\"Skill description (what it does, when to use it)\")\n            .interact_text()?;\n        if prompt.trim().is_empty() {\n            anyhow::bail!(\"description must not be empty\");\n        }\n        Ok(prompt)\n    } else {\n        anyhow::bail!(\"--description is required when stdin is not a TTY\");\n    }\n}\n\nfn open_in_editor(path: &std::path::Path) -> Result<()> {\n    let Some(editor) = editor_from_env_or_path() else {\n        anyhow::bail!(\"no editor found; set VISUAL or EDITOR\");\n    };\n    let status = std::process::Command::new(&editor).arg(path).status()?;\n    if !status.success() {\n        anyhow::bail!(\"{editor} exited with non-zero status\");\n    }\n    Ok(())\n}\n\nfn editor_from_env_or_path() -> Option<String> {\n    std::env::var(\"VISUAL\")\n        .ok()\n        .filter(|value| !value.trim().is_empty())\n        .or_else(|| {\n            std::env::var(\"EDITOR\")\n                .ok()\n                .filter(|value| !value.trim().is_empty())\n        })\n        .or_else(|| {","sourceCodeStart":1215,"sourceCodeEnd":1251,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/src/skills/mod.rs#L1215-L1251","documentation":"open_in_editor needs an editor to open the generated skill file. editor_from_env_or_path checks VISUAL, then EDITOR (both must be non-empty), then a fallback list (notepad.exe/nano/vim and similar) located on PATH. This error means every source came up empty, so the file cannot be opened for editing.","triggerScenarios":"VISUAL and EDITOR unset (or set to empty/whitespace strings, which are filtered out) and no fallback editor binary found on PATH; minimal container or CI images that ship no editor; PATH not including the directory containing nano/vim.","commonSituations":"Docker/CI images without editors installed; fresh minimal shells where VISUAL/EDITOR were never configured; headless servers; the env var set but empty (export EDITOR=\"\").","solutions":["Export VISUAL or EDITOR to a working editor, e.g. export VISUAL=vim","Install a fallback editor such as nano or vim and make sure it is on PATH","Skip the editor step by supplying all content via non-interactive flags and editing the file manually afterwards at the printed path"],"exampleFix":"# before\nzeroclaw skills create my-skill   # no editor found\n# after\nexport VISUAL=nano\nzeroclaw skills create my-skill","handlingStrategy":"fallback","validationCode":"# check an editor will be found before running the command\nif [ -z \"${VISUAL:-${EDITOR:-}}\" ] && ! command -v nano vim vi >/dev/null 2>&1; then\n  echo \"no editor available; set VISUAL or EDITOR\" >&2; exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set VISUAL (preferred) or EDITOR in shell profiles, container images, and CI environments","Include a terminal editor like nano or vim in images that run this CLI","Use blocking terminal editors rather than forking GUI editors"],"tags":["editor","env-var","cli","skills","path","rust"],"backgroundTag":"missing-env-var","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}