{"record":{"id":"397b317f6b00b888","repo":"upstash/context7","slug":"failed-to-download-skill-name-downloaddata-e","errorCode":null,"errorMessage":"Failed to download ${skill.name}: ${downloadData.error}","messagePattern":"Failed to download (.+?): (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/cli/src/commands/skill.ts","lineNumber":417,"sourceCode":"    log.warn(\"Installation cancelled\");\n    return;\n  }\n\n  const targetDirs = getTargetDirs(targets);\n\n  const installSpinner = ora(\"Installing skills...\").start();\n\n  let permissionError = false;\n  const failedDirs: Set<string> = new Set();\n  const installedSkills: string[] = [];\n\n  for (const skill of selectedSkills) {\n    try {\n      installSpinner.text = `Downloading ${skill.name}...`;\n      const downloadData = await downloadSkill(skill.project, skill.name);\n\n      if (downloadData.error) {\n        log.warn(`Failed to download ${skill.name}: ${downloadData.error}`);\n        continue;\n      }\n\n      installSpinner.text = `Installing ${skill.name}...`;\n\n      const [primaryDir, ...symlinkDirs] = targetDirs;\n\n      try {\n        await installSkillFiles(skill.name, downloadData.files, primaryDir);\n      } catch (dirErr) {\n        const error = dirErr as NodeJS.ErrnoException;\n        if (error.code === \"EACCES\" || error.code === \"EPERM\") {\n          permissionError = true;\n          failedDirs.add(primaryDir);\n        }\n        throw dirErr;\n      }\n","sourceCodeStart":399,"sourceCodeEnd":435,"githubUrl":"https://github.com/upstash/context7/blob/4416fb855b8f752be735e34f943b5d0762701aad/packages/cli/src/commands/skill.ts#L399-L435","documentation":"During skill installation, the registry download API may return a payload with an error field (e.g. skill not available, registry-side failure). The install command logs \"Failed to download <skill>: <error>\" and skips that skill via continue, leaving the spinner running for the next skill instead of throwing.","triggerScenarios":"downloadSkill(skill.project, skill.name) returns { error } — typically when the skill doesn't exist for that project, the registry API rejects the request (rate limit, auth issue), or the project/name is mistyped.","commonSituations":"Typo in skill or project name, the skill was removed/renamed upstream, registry outage or rate limiting, or an outdated CLI caching stale skill lists.","solutions":["Check the logged error text and verify the skill/project names with the search/list command.","Retry later if the error indicates rate limiting or a registry outage.","Update the Context7 CLI to refresh the skill catalog.","Select a different/renamed skill if the original was removed upstream."],"exampleFix":"// before\ncontext7 skill install my-skill           // name typo -> downloadData.error\n// after\ncontext7 skill search my-skill            // confirm exact name\ncontext7 skill install correct-skill-name","handlingStrategy":"try-catch","validationCode":"const skills = await searchSkills(query);\nif (!skills.some(s => s.project === project && s.name === name)) {\n  console.warn(`Skill ${project}/${name} not found; check spelling`);\n}","typeGuard":"function hasDownloadError(d: { error?: string } | null): d is { error: string } {\n  return d !== null && typeof d.error === 'string' && d.error.length > 0;\n}","tryCatchPattern":"for (const skill of selectedSkills) {\n  const data = await downloadSkill(skill.project, skill.name).catch(e => ({ error: String(e) }));\n  if (hasDownloadError(data)) {\n    failures.push({ skill: skill.name, reason: data.error }); // retry later\n    continue;\n  }\n  await install(data);\n}","preventionTips":["Verify skill names with the search/list command before batch installs","Update the CLI so the skill catalog isn't stale","Throttle batch installs to avoid registry rate limits","Collect failures and retry after transient registry errors instead of aborting"],"tags":["cli","download","registry"],"backgroundTag":"api-error-response","analyzedSha":"4416fb855b8f752be735e34f943b5d0762701aad","analyzedAt":"2026-09-16T20:28:07.148Z","contentChangedAt":"2026-09-16T20:28:07.148Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}