{"record":{"id":"b7253165b4227ef9","repo":"upstash/context7","slug":"no-dependencies-detected","errorCode":null,"errorMessage":"No dependencies detected","messagePattern":"No dependencies detected","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/cli/src/commands/skill.ts","lineNumber":836,"sourceCode":"  }\n\n  log.plain(\n    `${pc.bold(\"Quick commands:\")}\\n` +\n      `  Install all: ${pc.cyan(`ctx7 skills install ${repo} --all`)}\\n` +\n      `  Install one: ${pc.cyan(`ctx7 skills install ${repo} ${data.skills[0]?.name}`)}\\n`\n  );\n}\n\nasync function suggestCommand(options: SuggestOptions): Promise<void> {\n  trackEvent(\"command\", { name: \"suggest\" });\n  log.blank();\n\n  // Step 1: Detect dependencies\n  const scanSpinner = ora(\"Scanning project dependencies...\").start();\n  const deps = await detectProjectDependencies(process.cwd());\n\n  if (deps.length === 0) {\n    scanSpinner.warn(pc.yellow(\"No dependencies detected\"));\n    log.info(`Try ${pc.cyan(\"ctx7 skills search <keyword>\")} to search manually`);\n    return;\n  }\n\n  scanSpinner.succeed(`Found ${deps.length} dependencies`);\n\n  // Step 2: Single API call to backend\n  const searchSpinner = ora(\"Finding matching skills...\").start();\n\n  const accessToken = await getValidAccessToken();\n\n  let data;\n  try {\n    data = await suggestSkills(deps, accessToken);\n  } catch {\n    searchSpinner.fail(pc.red(\"Failed to connect to Context7\"));\n    return;\n  }","sourceCodeStart":818,"sourceCodeEnd":854,"githubUrl":"https://github.com/upstash/context7/blob/4416fb855b8f752be735e34f943b5d0762701aad/packages/cli/src/commands/skill.ts#L818-L854","documentation":"The `ctx7 skill suggest` command (auto-detect flow) scans the current project for dependencies (detectProjectDependencies on process.cwd()). If nothing is detected, it warns and suggests a manual search instead. It indicates the project manifest (package.json, requirements.txt, etc.) is missing, unreadable, or lists no recognizable dependencies.","triggerScenarios":"Running `ctx7 skill suggest` in a directory with no dependency manifest, an empty manifest, or one using a format detectProjectDependencies does not recognize.","commonSituations":"Running in the wrong directory (parent of the actual project); brand-new project with no dependencies declared yet; monorepo where deps live in workspace subdirectories; unsupported manifest format.","solutions":["cd into the project root that contains package.json / other dependency manifests and re-run","Add dependencies to the project manifest if the project is intentionally empty","Use `ctx7 skills search <keyword>` for manual skill search as the message suggests","Ensure the manifest format is one ctx7 recognizes (npm, pip, cargo, etc.)"],"exampleFix":"// before (empty dir)\n$ ctx7 skill suggest\n// after\n$ cd ~/projects/my-app   # directory containing package.json\n$ ctx7 skill suggest","handlingStrategy":"validation","validationCode":"import { existsSync, readFileSync } from 'fs';\nconst manifest = ['package.json', 'requirements.txt', 'Cargo.toml', 'go.mod'].find(existsSync);\nif (!manifest) {\n  console.error('No dependency manifest in cwd; cd to the project root or run ctx7 skills search manually.');\n  process.exit(1);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always run suggest from the project root containing a dependency manifest","Keep your manifest populated before using suggest","Use manual `ctx7 skills search` for manifest-less or exotic projects"],"tags":["cli","dependency-scan","empty-state"],"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"}