{"record":{"id":"0e6b35453af66e52","repo":"upstash/context7","slug":"no-skills-found-matching-query","errorCode":null,"errorMessage":"No skills found matching \"${query}\"","messagePattern":"No skills found matching \"(.+?)\"","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"packages/cli/src/commands/skill.ts","lineNumber":499,"sourceCode":"  trackEvent(\"command\", { name: \"search\" });\n  log.blank();\n  const spinner = ora(`Searching for \"${query}\"...`).start();\n\n  let data;\n  try {\n    data = await searchSkills(query);\n  } catch (err) {\n    spinner.fail(pc.red(`Error: ${err instanceof Error ? err.message : String(err)}`));\n    return;\n  }\n\n  if (data.error) {\n    spinner.fail(pc.red(`Error: ${data.message || data.error}`));\n    return;\n  }\n\n  if (!data.results || data.results.length === 0) {\n    spinner.warn(pc.yellow(`No skills found matching \"${query}\"`));\n    return;\n  }\n\n  spinner.succeed(`Found ${data.results.length} skill(s)`);\n  trackEvent(\"search_query\", { query, resultCount: data.results.length });\n  log.blank();\n\n  const indexWidth = data.results.length.toString().length;\n  const nameWithRepo = (s: SkillSearchResult) => `${s.name} ${pc.dim(`(${s.project})`)}`;\n  const nameWithRepoLen = (s: SkillSearchResult) => `${s.name} (${s.project})`.length;\n  const maxNameLen = Math.max(...data.results.map(nameWithRepoLen));\n  const popularityColWidth = 13;\n  const choices = data.results.map((s, index) => {\n    const indexStr = pc.dim(`${(index + 1).toString().padStart(indexWidth)}.`);\n    const rawLen = nameWithRepoLen(s);\n    const displayName = nameWithRepo(s) + \" \".repeat(maxNameLen - rawLen);\n    const popularity = formatPopularity(s.installCount) + \" \".repeat(popularityColWidth - 4);\n    const trust = formatTrust(s.trustScore);","sourceCodeStart":481,"sourceCodeEnd":517,"githubUrl":"https://github.com/upstash/context7/blob/4416fb855b8f752be735e34f943b5d0762701aad/packages/cli/src/commands/skill.ts#L481-L517","documentation":"Fired by searchCommand when the registry/API call succeeded (no exception, no data.error) but returned an empty results array for the user's query string. It signals an empty-but-valid search outcome rather than a failure: the spinner is switched to a warning state and the command exits without rendering any result list, so callers should treat it as 'query matched nothing', not a network or parsing error.","triggerScenarios":"Running `opencode skill search <query>` where the remote search API returns data.results as an empty array (or null/undefined) for the given query string.","commonSituations":"Misspelled skill name; searching an obscure term no published skill matches; querying against a registry index that has not indexed newer skills; network/proxy returning an empty-but-valid payload.","solutions":["Check the query spelling and try broader or alternative keywords","Browse the skill registry in a browser to confirm the skill name","Verify the registry/endpoint the CLI points at is the expected one and is indexed/healthy","Use `skill install <repo>` directly if you already know the repository"],"exampleFix":"// before\n$ opencode skill search supabse-auth   # typo -> No skills found matching \"supabse-auth\"\n// after\n$ opencode skill search supabase      # broader/corrected query returns results","handlingStrategy":"fallback","validationCode":"const { results } = await searchSkills(query);\nif (!results || results.length === 0) {\n  console.warn(`No results for \"${query}\"; try broader keywords or verify the registry.`);\n}","typeGuard":"if (!Array.isArray(results) || results.length === 0) { /* treat as empty search */ }","tryCatchPattern":null,"preventionTips":["Double-check spelling of skill names","Use short, broad queries then narrow interactively","Confirm you are pointed at the intended registry endpoint"],"tags":["cli","search","empty-result-set"],"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"}