upstash/context7 · warning

No skills found matching "${query}"

Error message

No skills found matching "${query}"

What it means

After `context7 skill search <query>` completes searchSkills() without an error payload, the results array is empty or missing. The CLI marks the spinner 'warn' with 'No skills found matching "<query>"' and returns — no selection prompt is shown.

Source

Thrown at packages/cli/src/commands/skill.ts:499

  trackEvent("command", { name: "search" });
  log.blank();
  const spinner = ora(`Searching for "${query}"...`).start();

  let data;
  try {
    data = await searchSkills(query);
  } catch (err) {
    spinner.fail(pc.red(`Error: ${err instanceof Error ? err.message : String(err)}`));
    return;
  }

  if (data.error) {
    spinner.fail(pc.red(`Error: ${data.message || data.error}`));
    return;
  }

  if (!data.results || data.results.length === 0) {
    spinner.warn(pc.yellow(`No skills found matching "${query}"`));
    return;
  }

  spinner.succeed(`Found ${data.results.length} skill(s)`);
  trackEvent("search_query", { query, resultCount: data.results.length });
  log.blank();

  const indexWidth = data.results.length.toString().length;
  const nameWithRepo = (s: SkillSearchResult) => `${s.name} ${pc.dim(`(${s.project})`)}`;
  const nameWithRepoLen = (s: SkillSearchResult) => `${s.name} (${s.project})`.length;
  const maxNameLen = Math.max(...data.results.map(nameWithRepoLen));
  const popularityColWidth = 13;
  const choices = data.results.map((s, index) => {
    const indexStr = pc.dim(`${(index + 1).toString().padStart(indexWidth)}.`);
    const rawLen = nameWithRepoLen(s);
    const displayName = nameWithRepo(s) + " ".repeat(maxNameLen - rawLen);
    const popularity = formatPopularity(s.installCount) + " ".repeat(popularityColWidth - 4);
    const trust = formatTrust(s.trustScore);

View on GitHub (pinned to 5284672feb)

Solutions

  1. Broaden or simplify the query — search by primary framework/tool name rather than full skill titles.
  2. Check spelling and try common variants (e.g. 'react' instead of 'reactjs').
  3. If you know the repository, skip search: `context7 skill add owner/repo [skill]`.
  4. Wait/retry if the skill was published very recently and may not be indexed yet.
Defensive patterns

Strategy: validation

Validate before calling

// Cheap client-side guard: reject obviously-unmatchable queries
if (!query.trim() || query.trim().length < 2) {
  console.error("Search query too short - use a library/tool name.");
  process.exit(1);
}

Type guard

type SearchResponse = { results?: unknown[] };

function hasSearchResults(data: SearchResponse): boolean {
  return Array.isArray(data.results) && data.results.length > 0;
}

Prevention

When it happens

Trigger: Search API returned 200 with zero results: overly specific or misspelled query, query for a library with no published skills, or punctuation/format the search index does not match on.

Common situations: Searching a brand-new skill repo not yet indexed; using the repo's full URL instead of a keyword; hyphenation/casing differences between the query and indexed names.

Related errors


AI-assisted analysis of upstash/context7@5284672feb (2026-08-18). Data as JSON: /api/errors/0e6b35453af66e52. Report an issue: GitHub.