{"record":{"id":"7bcc8dd752677ecd","repo":"zed-industries/zed","slug":"paste-a-github-url-that-points-to-a-md-file","errorCode":null,"errorMessage":"Paste a GitHub URL that points to a .md file","messagePattern":"Paste a GitHub URL that points to a \\.md file","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/settings_ui/src/pages/skill_creator.rs","lineNumber":1115,"sourceCode":"\n    if *kind != \"blob\" {\n        anyhow::bail!(\"Paste a GitHub blob URL that points to a .md file\");\n    }\n\n    ensure_markdown_path(file_path)?;\n    Ok(format!(\n        \"https://raw.githubusercontent.com/{owner}/{repo}/{reference}/{}\",\n        file_path.join(\"/\")\n    ))\n}\n\nfn ensure_markdown_path(path_segments: &[&str]) -> Result<()> {\n    let Some(file_name) = path_segments.last() else {\n        anyhow::bail!(\"Paste a GitHub .md URL\");\n    };\n\n    if !file_name.to_ascii_lowercase().ends_with(\".md\") {\n        anyhow::bail!(\"Paste a GitHub URL that points to a .md file\");\n    }\n\n    Ok(())\n}\n\nfn parse_imported_skill(content: &str, source_url: &str) -> Result<ImportedSkill> {\n    if content.trim_start().starts_with(\"---\") {\n        let (metadata, body) = parse_skill_file_content(content)?;\n        return Ok(ImportedSkill {\n            name: metadata.name,\n            description: metadata.description,\n            body: body.trim().to_string(),\n            disable_model_invocation: metadata.disable_model_invocation,\n        });\n    }\n\n    Ok(ImportedSkill {\n        name: derived_skill_name_from_url(source_url).unwrap_or_else(|| \"imported-skill\".into()),","sourceCodeStart":1097,"sourceCodeEnd":1133,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/settings_ui/src/pages/skill_creator.rs#L1097-L1133","documentation":"Raised in ensure_markdown_path when the URL's final path segment does not end with .md (case-insensitive). Only markdown skill files can be imported; the file name at fault is the last path segment of the GitHub URL.","triggerScenarios":"Thrown at crates/settings_ui/src/pages/skill_creator.rs:1115 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Link directly to a .md file (e.g. SKILL.md), not a directory or other file type","If the skill is split across files, import the SKILL.md entry point"],"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"}