
github-search
Search GitHub with the gh CLI: find repositories, code, and issues/PRs, and see how open-source projects use a library. Use when looking for repos, usage examples, or reported bugs and workarounds on GitHub.
- Installs
- 65
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/samhvw8/dotfiles --skill github-search- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads github-search automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
GitHub Search
Quick Commands
| Goal | Command |
|---|---|
| Search repos | gh search repos "<query>" --limit 30 |
| Search code | gh search code "<query>" --limit 30 |
| Search issues | gh search issues "<query>" --limit 30 |
| Search PRs | gh search prs "<query>" --limit 30 |
Keyword Strategy: Variants & Long → Short
GitHub matches your query tokens against repo name + description + README (for code search, the file contents). There is no semantic matching — a repo is invisible if its text doesn't contain words close to yours. Two ways a search misses:
- Wrong word — the author used a synonym you didn't try.
- Too long — your compound phrase is more specific than any repo's name/description, so nothing matches.
Fix: generate keyword variants, and cascade from longer to shorter.
# ❌ Brittle — one long compound, matches almost nothing
gh search repos "AI powered headless browser automation framework"
# ✅ Variants + length cascade — run in parallel, shorter terms guarantee coverage
gh search repos "headless browser automation" --sort stars --limit 15
gh search repos "headless browser" --sort stars --limit 15
gh search repos "browser automation" --sort stars --limit 15
gh search repos "browserless" --sort stars --limit 15 # synonym
gh search repos "browser" --sort stars --limit 15 # shortest, widest net
| Rule | Why |
|---|---|
| Longer → shorter | Each word you drop widens the match set; the shortest core noun catches repos with zero topics and terse descriptions |
| Generate variants | Authors and users pick different words (headless vs browserless, agent vs bot) — cover the synonyms |
| Never long-only | A single long compound is the most brittle query — if it's all you run, you miss the field |
| Run in parallel | Batch all variants into simultaneous calls; cost is the same, coverage is far higher |
| Repeat per language | Run the cascade in each target language with native terms (无头浏览器, автоматизация браузера) |
Direct API Search (Web-Exact Results)
For complex queries where gh search repos gives different results than web:
# Template - URL-encodes query automatically
gh api "search/repositories?q=$(printf '%s' 'YOUR_QUERY_HERE' | jq -sRr @uri)&sort=updated&per_page=30" --jq '.items[].full_name'
Example - Multi-language with exclusions:
gh api "search/repositories?q=$(printf '%s' 'stars:>500 language:rust language:go language:TypeScript language:javascript -topic:ethereum -topic:cryptocurrency -topic:blockchain -topic:bitcoin -topic:web3' | jq -sRr @uri)&sort=updated&per_page=10" --jq '.items[].full_name'
Why use this?
gh search reposis a convenience wrapper with its own query parsinggh api search/repositorieshits the raw API, matching web behavior exactly- Required when combining: multiple languages + topic exclusions + star filters
Common jq extractions:
| Output | jq filter |
|---|---|
| Names only | --jq '.items[].name' |
| Full names | --jq '.items[].full_name' |
| With stars | --jq '.items[] | "\(.full_name) ⭐\(.stargazers_count)"' |
| URLs | --jq '.items[].html_url' |
| Full JSON | (omit --jq) |
Patterns
Finding Repositories
When you see: User wants to find projects/repos by criteria
Use: gh search repos
# Basic search with stars
gh search repos "stars:>500 language:rust" --sort=stars --limit=50
# Multiple languages (OR logic)
gh search repos "language:rust language:go language:typescript"
# Exclude topics
gh search repos "stars:>1000 -topic:cryptocurrency -topic:blockchain"
# By topic
gh search repos "topic:cli topic:terminal stars:>100"
# Recently updated (pick a date a few months back)
gh search repos "language:python pushed:>YYYY-MM-DD"
Output formats:
--json name,url,description,stargazersCount # JSON output
--web # Open in browser
Finding Code Examples
When you see: User wants to know how to use a library
Use: gh search code
# Find usage patterns
gh search code "from zod import" --limit=20
gh search code "import { z } from 'zod'" --limit=20
# In specific file types
gh search code "useQuery" extension:tsx --limit=30
# In specific paths
gh search code "tanstack/query" path:src/ extension:ts
# Exact phrase
gh search code '"createTRPCRouter"' extension:ts
Pro tip: Combine with repo filter for focused results:
gh search code "pattern" repo:owner/repo
Finding Issues/Discussions
When you see: User looking for bug reports, feature requests, or discussions
Use: gh search issues or gh search prs
# Open issues with label
gh search issues "is:open label:bug repo:facebook/react"
# PRs by author
gh search prs "author:username is:merged"
# Issues mentioning error
gh search issues '"connection refused" language:go'
Query Qualifiers Reference
Repo Search
| Qualifier | Example | Description |
|---|---|---|
stars: | stars:>1000, stars:100..500 | Star count |
forks: | forks:>100 | Fork count |
language: | language:rust | Primary language |
topic: | topic:cli | Repository topic |
-topic: | -topic:blockchain | Exclude topic |
pushed: | pushed:>2024-01-01 | Last push date |
created: | created:>2023-01-01 | Creation date |
license: | license:mit | License type |
archived: | archived:false | Archive status |
is: | is:public, is:private | Visibility |
Code Search
| Qualifier | Example | Description |
|---|---|---|
extension: | extension:ts | File extension |
path: | path:src/ | File path |
repo: | repo:owner/name | Specific repo |
language: | language:javascript | Code language |
filename: | filename:package.json | File name |
Common Flags
| Flag | Description |
|---|---|
--limit N | Number of results (max 1000) |
--sort X | Sort by: stars, forks, updated, best-match |
--order X | asc or desc |
--json FIELDS | JSON output with specific fields |
--web | Open results in browser |
Common Use Cases
"Find popular X repos"
gh search repos "language:X stars:>500" --sort=stars --limit=50
"How do people use library Y"
gh search code "import Y" extension:ts --limit=30
gh search code "from Y import" extension:py --limit=30
"Find repos like Z but exclude crypto"
gh search repos "topic:Z -topic:cryptocurrency -topic:blockchain -topic:web3"
"Find recent active projects"
gh search repos "language:go pushed:>YYYY-MM-DD stars:>100" --sort=updated
Tips
- Quote the query when it contains special chars:
gh search repos "stars:>500" - Multiple languages = OR:
language:rust language:gomatches either - Use
--jsonfor scripting:--json name,url,stargazersCount - Date ranges:
pushed:2024-01-01..2024-06-01 - Numeric ranges:
stars:100..500 - Use
gh apifor complex queries: Whengh search reposgives unexpected results, usegh api search/repositories?q=...for exact web parity
FAQ
What does the github-search skill do?
Search GitHub with the gh CLI: find repositories, code, and issues/PRs, and see how open-source projects use a library. Use when looking for repos, usage examples, or reported bugs and workarounds on GitHub.
How do I install github-search?
Run npx skills add https://github.com/samhvw8/dotfiles --skill github-search in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/github-search/ (personal) or .claude/skills/github-search/ (project).
Which AI agents can use github-search?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is github-search safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains github-search?
It is published by samhvw8 in samhvw8/dotfiles. It has 65 recorded installs.
More from samhvw8/dotfiles
code-quality
samhvw8/dotfiles
Review, refactor, and debug code with verification before claiming done. Use when responding to review feedback, requesting a review, refactoring or reducing technical debt, root-causing a bug or failing test, or checking work before a merge, commit, or completion claim.
frontend-development
samhvw8/dotfiles
Open the skill to read its SKILL.md instructions.
3d-graphics
samhvw8/dotfiles
Open the skill to read its SKILL.md instructions.
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.