{"record":{"id":"cebe6f70adae8d1b","repo":"upstash/context7","slug":"no-skills-found-in-repo","errorCode":null,"errorMessage":"No skills found in ${repo}","messagePattern":"No skills found in (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/cli/src/commands/skill.ts","lineNumber":312,"sourceCode":"    if ((data.error || !data.skills || data.skills.length === 0) && !data.blockedSkillsCount) {\n      spinner.text = `Fetching skills from GitHub...`;\n      const ghResult = await listSkillsFromGitHub(repo);\n      if (ghResult.status === \"repo_not_found\") {\n        spinner.fail(pc.red(`Repository not found: ${repo}`));\n        return;\n      }\n      if (ghResult.status === \"ok\" && ghResult.skills.length > 0) {\n        data = { project: repo, skills: ghResult.skills };\n      }\n    }\n\n    if (data.error && (!data.skills || data.skills.length === 0)) {\n      spinner.fail(pc.red(`Error: ${data.message || data.error}`));\n      return;\n    }\n\n    if (!data.skills || data.skills.length === 0) {\n      spinner.warn(pc.yellow(`No skills found in ${repo}`));\n      return;\n    }\n\n    const skillsWithRepo = data.skills\n      .map((s) => ({ ...s, project: repo }))\n      .sort((a, b) => (b.installCount ?? 0) - (a.installCount ?? 0));\n\n    spinner.succeed(`Found ${data.skills.length} skill(s)`);\n\n    if (data.blockedSkillsCount && data.blockedSkillsCount > 0) {\n      log.blank();\n      log.error(\n        `${data.blockedSkillsCount} skill(s) blocked due to prompt injection and not shown.`\n      );\n      log.warn(\"Review other skills from this repository carefully before installing.\");\n    }\n\n    if (options.all || data.skills.length === 1) {","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/upstash/context7/blob/4416fb855b8f752be735e34f943b5d0762701aad/packages/cli/src/commands/skill.ts#L294-L330","documentation":"In skill.ts installCommand() (list/install path), when the repository query returns no skills — data.skills is missing or an empty array — the spinner warns `No skills found in ${repo}` and returns. It is a benign empty-result case, not a network or auth failure (those take the earlier error branch).","triggerScenarios":"getSkill/list call for `repo` succeeds but returns no skills: data.skills is undefined or length 0 and the earlier error branch did not fire; typically the repo has no skills indexed or the repo slug is wrong yet valid.","commonSituations":"Typo in the GitHub owner/repo slug; a repo that exists but publishes no skills; skills not yet indexed by Context7 for a brand-new repo; case/suffix mistakes in the repo argument.","solutions":["Verify the repo slug (owner/repo) is spelled and cased correctly","Browse the repo on GitHub to confirm it actually contains skills in the expected location","Wait/retry if the repo was just published — indexing can lag","Use the Context7 search/list command to find the correct repo name"],"exampleFix":"// before\n// $ context7 skill install user/typo-repo\n//   ! No skills found in user/typo-repo\n// after\n// $ context7 skill install user/correct-repo","handlingStrategy":"validation","validationCode":"if (!data.skills || data.skills.length === 0) {\n  console.warn(`Repo \"${repo}\" has no indexed skills; verify the owner/repo slug.`);\n  return;\n}","typeGuard":"function hasSkills(data) {\n  return Array.isArray(data?.skills) && data.skills.length > 0;\n}","tryCatchPattern":null,"preventionTips":["Double-check the owner/repo slug before installing","Confirm the repo publishes skills in the expected directory","Retry after a delay for newly published repos (indexing lag)","Use the search/list command to discover valid repo names"],"tags":["cli","empty-result","skill-install"],"backgroundTag":"empty-result-set","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"}