aaddrick/gh-cli-search/gh-search
- community
Checking that the SKILL.md file is still in the repository.
Use when searching GitHub via CLI for issues, PRs, repos, code, or commits - provides correct syntax for exclusions, qualifiers, quoting, and platform-specific handling to avoid command failures
Install
npx vskill@latest install aaddrick/gh-cli-search/gh-searchSKILL.md
GitHub CLI Search
Overview
Search GitHub from the command line using gh search subcommands. The key principle: Always use `--` before queries with exclusions to prevent shell interpretation of - prefixes.
When to Use
Use this skill when:
- Searching GitHub via
ghCLI for issues, PRs, repos, code, or commits - User requests searches with exclusions (NOT, minus prefix)
- Constructing complex queries with multiple qualifiers
- Queries contain spaces or special characters
Subcommands Quick Reference
| Subcommand | Use For | Common Flags | |
|---|---|---|---|
gh search issues | Issues (add --include-prs for PRs too) | --label, --state, --author, --assignee | |
gh search prs | Pull requests only | --label, --state, --author, --draft, --merged | |
gh search repos | Repositories | --language, --stars, --topic, --owner | |
gh search code | Code within files | --repo, --language, --filename | |
gh search commits | Commit messages | --repo, --author, --committer |
Critical Syntax Rules
1. Exclusions Require -- Flag
Unix/Linux/Mac:
PowerShell:
Why: The - prefix gets interpreted as a command flag without --. PowerShell needs --% to stop parsing.
2. Quoting Rules
Multi-word queries need quotes:
Entire query with spaces should be quoted:
Qualifier values with spaces need inner quotes:
3. Qualifier Syntax
Inline qualifiers (use within search query):
Flag-based (use as separate flags):
Can mix both:
Common Qualifiers
Comparison Operators
>,>=,<,<=- Numeric:stars:>100,comments:>=5..- Ranges:stars:10..50,created:2024-01-01..2024-12-31
Special Values
@me- Current user:author:@me,assignee:@me,owner:@me- Dates use ISO8601:
created:>2024-01-01orcreated:2024-01-01..2024-12-31
Field-Specific Search
in:title- Search in title onlyin:body- Search in body onlyin:comments- Search in comments only
Exclusions
-qualifier:value- Exclude:-label:bug,-language:javascriptNOTkeyword - For words only:"hello NOT world"
Examples
Find your open issues without bug label:
Find popular Python ML repos updated recently:
Find PRs with specific label and text:
Search code in organization repos:
Common Mistakes
| Mistake | Problem | Fix | |
|---|---|---|---|
gh search issues -label:bug | -label interpreted as flag | Add --: gh search issues -- "-label:bug" | |
gh search repos machine learning | Searches "machine" OR "learning" | Quote it: "machine learning" | |
in:title outside quotes | Shell interprets : oddly | Include in query: "crash in:title" | |
Mixing @ with value | Invalid syntax | Use @me or username, not both: author:@me ✓, author:@username ✗ (drop @) | |
PowerShell without --% | Parsing breaks with exclusions | Add gh --% before command |
Output Options
All subcommands support:
--limit <n>- Max results (default: 30, max: 1000)--json <fields>- JSON output for scripting--web- Open results in browser--sort <field>- Sort by: comments, created, reactions, updated, stars, etc.--order asc|desc- Sort direction (default: desc)
Real-World Impact
Correct syntax prevents:
- Command failures from misinterpreted flags
- Missing results from incorrect exclusions
- Errors from unquoted spaces
- Platform-specific parsing issues
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationPassed, 83 of 100Effective. 1 run. Evaluated 7 months ago.
Source
- SKILL.md in the repositoryCheckingskills/gh-search/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 7
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aaddrick/gh-cli-search/gh-search)