search_repos
Find GitHub repositories by running multiple query phrasings in parallel. Results are ranked by description and topic match, not just star count, to surface quality gems for development reference.
Instructions
Discover GitHub repositories — the go-to tool for finding real, maintained, coherent repos during a coding session. Optimized for "find reference implementations / prior art / learning material / small-but-quality gems in an ecosystem," NOT for "rank by raw popularity." Returns per-result: name, full description, topics, primary language, star count, last-push date, license, homepage, and archived status.
Dev-session use cases this serves well:
• "Rust agent harness — what are my options?" — finds frameworks/harnesses ranked by literal relevance, not star count
• "Python async rate limiter — show me existing libraries" — dedicated libs beat big frameworks
• "What's the landscape of LLM observability tools?" — surfaces the actual category leaders
• "Is there already a tool for managing Claude Code sessions?" — hyper-specific gem hunting, small focused CLIs float up
• "What's new in this ecosystem this week?" — set `trending=True` for repos created in the last 7 days
• "Disambiguate a name the user mentioned" — one-hop metadata lookup
Ranking (multi-query mode): composite relevance score combining literal description match × 3, topic-tag match × 2, cross-phrasing robustness × 2, recency bonus (0-3), and log-scaled stars at half-weight. Stars are a TIEBREAK, not a driver — this is why a 500-star literal-match repo can outrank a 40,000-star repo that doesn't contain the query terms in its description. Tested against 6 dev-session queries in benchmarks/rank_experiment.py; composite scoring produced the best top-5 on 5/6 queries and consistently surfaced small-but-quality gems that star-first ranking buried.
Query sharpness — most→least noisy:
• `topic:X` — self-assigned tags. Noisy for umbrella terms (e.g. `topic:mcp` returns opportunistic taggers like n8n). Sharp for tight niches (`topic:ratatui`).
• `in:readme "phrase"` — matches any mention in the README. Medium.
• `in:description "phrase"` — matches repos whose short description contains the phrase. Sharpest, but note that GitHub does literal substring matching — so `"embeddings database"` will also match "embedded database" (burned in testing). Prefer specific, domain-meaningful phrases.
SHORTLISTING — always use `queries=[...]` with 2-4 phrasings. Single-phrase `in:description` is sharp but narrow; popular options routinely describe themselves with different wording. For example, `in:description "Postgres operator"` returns Zalando's postgres-operator (5k★) but misses CloudNativePG (8k★), which describes itself as "Kubernetes-native PostgreSQL." Passing both phrasings via `queries=` runs them in parallel, dedupes by repo, and annotates each result with `matched K/N`. Recipe for concept X in language L: `queries=['in:description "X" language:L', 'in:description "X synonym" language:L', 'topic:X-slug language:L']`.
Other tips: keep queries short (GitHub uses AND logic — more terms = fewer results). Use the `language` filter instead of putting the language in the query. Use `archived:false` to exclude abandoned repos. Use `pushed:>YYYY-MM-DD` to filter by activity. For strict popularity filtering (production dependency shortlisting), add `stars:>N` explicitly — the tool no longer applies a star floor by default because gem-finding needs to see small repos.
NOT for: searching code inside repos (use `search_code`), fetching a repo you already know by name (use `get_file`/`repo_tree`), or authoritative library popularity (check package registries via `search_packages`).
IMPORTANT: repo search does NOT support file-level qualifiers like path:, filename:, extension:, content:, symbol: — GitHub silently matches them as literal content, giving misleading results with no error. Use `search_code` for those.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Repository search query. Keep short (1-2 terms) — AND logic means more terms = fewer results. Use topic: for ecosystem discovery. Repo-search qualifiers: in:, repo:, user:, org:, size:, followers:, forks:, stars:, created:, pushed:, language:, topic:, license:, is:, mirror:, archived:, template:. File/content qualifiers (path:, filename:, extension:, content:, symbol:) are NOT supported by repo search — use `search_code` for those. | |
| queries | No | List of query phrasings to run in parallel and merge. STRONGLY PREFERRED over `query` for shortlisting work — pass 2-4 different phrasings of the same concept (e.g. ['in:description "Postgres operator"', 'in:description "PostgreSQL" in:description "Kubernetes"', 'topic:postgres-operator']) and the tool will run them concurrently, dedupe by repo, and rank the union. Each result is annotated with `matched K/N` showing how many of your phrasings found it — a popular option found by only one phrasing would have been missed by a single-query call. If both `query` and `queries` are set, `query` is prepended to the list. | |
| topic | No | Filter by topic. | |
| language | No | Filter by programming language. | |
| trending | No | If true, find repos created in the last 7 days sorted by stars. | |
| sort | No | Sort by: stars, forks, updated, or best match. | best match |
| order | No | Sort order: asc or desc. | desc |
| page | No | Page number. | |
| per_page | No | Results per page (max 100). |