upstash/context7 · warning · Error
downloadData.error || "no files"
Error message
downloadData.error || "no files"
What it means
Thrown by the CLI `setup` command after `downloadSkill("/upstash/context7", ...)` returns a non-empty `error` string or an empty `files` array. `downloadSkill` first calls the Context7 registry, then falls back to GitHub (`getSkillFromGitHub`, which needs GITHUB_TOKEN for private repos); failure at either stage collapses into `{ files: [], error }` instead of throwing. The error is caught immediately and shown as `skillStatus = "failed: ..."` in the setup summary, so MCP and rule configuration still complete.
Source
Thrown at packages/cli/src/commands/setup.ts:368
const result = await installRule(agentName, "mcp", scope);
ruleStatus = result.status;
rulePath = result.path;
} catch (err) {
ruleStatus = `failed: ${err instanceof Error ? err.message : String(err)}`;
rulePath = "";
}
const skillDir =
scope === "global"
? agent.skill.dir("global")
: join(process.cwd(), agent.skill.dir("project"));
const skillPath = join(skillDir, agent.skill.name, "SKILL.md");
let skillStatus: string;
try {
const downloadData = await downloadSkill("/upstash/context7", agent.skill.name);
if (downloadData.error || downloadData.files.length === 0) {
throw new Error(downloadData.error || "no files");
}
await installSkillFiles(agent.skill.name, downloadData.files, skillDir);
skillStatus = "installed";
} catch (err) {
skillStatus = `failed: ${err instanceof Error ? err.message : String(err)}`;
}
return {
agent: agent.displayName,
mcpStatus,
mcpPath,
ruleStatus,
rulePath,
skillStatus,
skillPath,
};
}
View on GitHub (pinned to 5284672feb)
Solutions
- Re-run `context7 setup` — GitHub rate limits and blips are usually transient
- Check network reachability of the registry and github.com from this machine (proxy/VPN)
- Set GITHUB_TOKEN if the skill source repo is private or rate-limited
- Verify the skill still exists at github.com/upstash/context7
- Continue without the skill (MCP config is already written) and create SKILL.md manually
Example fix
// before: unauthenticated GitHub fallback gets rate-limited
downloadSkill("/upstash/context7", skillName);
// after: export a token so the fallback path is authenticated
// export GITHUB_TOKEN=$(gh auth token)
downloadSkill("/upstash/context7", skillName); Defensive patterns
Strategy: fallback
Validate before calling
// Pre-check reachability before running setup
import { request } from 'undici';
async function canReachRegistry(baseUrl: string): Promise<boolean> {
try { const r = await request(baseUrl + '/ping', { method: 'GET' }); return r.statusCode < 500; }
catch { return false; }
} Try / catch
try {
const data = await downloadSkill('/upstash/context7', skillName);
if (data.error || data.files.length === 0) throw new Error(data.error || 'no files');
await installSkillFiles(skillName, data.files, skillDir);
} catch (err) {
// Non-fatal: MCP config already written; fall back to manual SKILL.md
console.warn(`skill install skipped: ${err instanceof Error ? err.message : err}`);
} Prevention
- Set GITHUB_TOKEN in CI before running context7 setup
- Keep the skill optional in automation — treat a failed skill install as a warning, not a pipeline failure
- Pin and cache the SKILL.md content locally if offline builds matter
When it happens
Trigger: Running `context7 setup` while the registry API errors for /upstash/context7 AND the GitHub fallback fails (no GITHUB_TOKEN for a private repo, unauthenticated GitHub rate limit, repo renamed); being offline so both the API and GitHub tarball download fail; the GitHub tree download returning zero files.
Common situations: Corporate proxy or firewall blocking api.context7.com or codeload.github.com; missing GITHUB_TOKEN env var; GitHub secondary rate limits during heavy CI usage; transient GitHub outage during setup.
Related errors
- Failed to download ${skill.name}: ${downloadData.error}
- Please try again
- No Context7 setup detected. Pass --claude, --cursor, --openc
- Setup cancelled
- Couldn't check for updates right now.
AI-assisted analysis of upstash/context7@5284672feb (2026-08-18).
Data as JSON: /api/errors/8062ee511d43c9fd.
Report an issue: GitHub.