zed-industries/zed · error
not a skill share link
Error message
not a skill share link
What it means
decode_skill_share_link validates the URL scheme/host against the zed://skill share-link prefix; any other link passed to it is rejected with this sentinel, indicating the input is not a skill share link.
Solutions
- Verify the link was produced by Share Skill (encode_skill_share_link) and was copied fully
- Check that the URL scheme and host match the zed://skill?data=… format and were not mangled by the transport
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/agent_skills/agent_skills.rs:835 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/8a77adff8e6eda56.
Report an issue: GitHub.
Appendix: source
Thrown at crates/agent_skills/agent_skills.rs:832
/// The contents are base64url-encoded (no padding) so the link is
/// self-contained and URL-safe: the recipient doesn't need the skill to be
/// hosted anywhere. Recover the contents with [`decode_skill_share_link`].
pub fn encode_skill_share_link(skill_file_content: &str) -> String {
use base64::Engine as _;
let data =
base64::engine::general_purpose::URL_SAFE_NO_PAD.encode(skill_file_content.as_bytes());
let mut url = Url::parse(SKILL_SHARE_LINK_PREFIX).expect("skill share link prefix is valid");
url.query_pairs_mut()
.append_pair(SKILL_SHARE_LINK_DATA_PARAM, &data);
url.into()
}
/// Recover the `SKILL.md` contents embedded in a `zed://skill?data=…` link
/// produced by [`encode_skill_share_link`].
pub fn decode_skill_share_link(link: &str) -> Result<String> {
use base64::Engine as _;
let url = Url::parse(link).context("skill share link is not a valid URL")?;
anyhow::ensure!(
url.scheme() == SKILL_SHARE_LINK_SCHEME && url.host_str() == Some(SKILL_SHARE_LINK_HOST),
"not a skill share link"
);
let data = url
.query_pairs()
.find_map(|(key, value)| (key == SKILL_SHARE_LINK_DATA_PARAM).then_some(value))
.context("skill share link is missing the `data` parameter")?;
let bytes = base64::engine::general_purpose::URL_SAFE_NO_PAD
.decode(data.as_bytes())
.context("skill share link `data` is not valid base64")?;
anyhow::ensure!(
bytes.len() <= MAX_SKILL_FILE_SIZE,
"shared skill exceeds the maximum size of {MAX_SKILL_FILE_SIZE} bytes"
);
let content = String::from_utf8(bytes).context("skill share link `data` is not valid UTF-8")?;
Ok(content)
}
View on GitHub (pinned to 9d272b0363)