{"record":{"id":"95c60677ca5db2e9","repo":"upstash/context7","slug":"no-skills-selected","errorCode":null,"errorMessage":"No skills selected","messagePattern":"No skills selected","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"packages/cli/src/commands/skill.ts","lineNumber":393,"sourceCode":"          loop: false,\n          theme: {\n            style: {\n              message: (text: string, status: string) => {\n                if (status === \"done\") return pc.dim(text.split(\"\\n\")[0]);\n                return pc.bold(text);\n              },\n            },\n          },\n        });\n      } catch {\n        log.warn(\"Installation cancelled\");\n        return;\n      }\n    }\n  }\n\n  if (selectedSkills.length === 0) {\n    log.warn(\"No skills selected\");\n    return;\n  }\n\n  const targets = await promptForInstallTargets(options);\n  if (!targets) {\n    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) {","sourceCodeStart":375,"sourceCodeEnd":411,"githubUrl":"https://github.com/upstash/context7/blob/5284672feb575908efead6fcf1b5e542f8d607bb/packages/cli/src/commands/skill.ts#L375-L411","documentation":"After the interactive skill selection for a repository, selectedSkills is empty — the user submitted the checkbox with nothing ticked (which, unlike Ctrl+C, does not throw). The CLI treats an empty selection as a dead end, warns 'No skills selected', and exits before asking for install targets.","triggerScenarios":"Pressing Enter on the skill checkbox with zero items selected; reachable only when the multi-select was shown (repo has multiple skills, no --all, no single-skill shortcut).","commonSituations":"User untoggles everything while browsing; spacebar/arrow-key slip unticks the last selected item before submission.","solutions":["Re-run the command and keep at least one skill ticked (space toggles, enter submits).","Skip the UI with `--all` or by naming the skill: `context7 skill add <repo> <skill>`."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Guard the selection result before proceeding\nif (!selectedSkills || selectedSkills.length === 0) {\n  log.warn(\"No skills selected\");\n  return;\n}","typeGuard":"function hasSelectedSkills(s: unknown[]): s is [unknown, ...unknown[]] {\n  return s.length > 0;\n}","tryCatchPattern":null,"preventionTips":["Keep at least one item ticked before submitting the checkbox (space toggles).","Default-select the named skill when the user already specified one to avoid empty states.","Treat an empty selection as a clean no-op, not an error."],"tags":["cli","skills","empty-selection","user-cancel"],"backgroundTag":"no-items-selected","analyzedSha":"5284672feb575908efead6fcf1b5e542f8d607bb","analyzedAt":"2026-08-18T18:00:18.510Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}