gh-search
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
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o gh-search.zip https://jpskill.com/download/8595.zip && unzip -o gh-search.zip && rm gh-search.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/8595.zip -OutFile "$d\gh-search.zip"; Expand-Archive "$d\gh-search.zip" -DestinationPath $d -Force; ri "$d\gh-search.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
gh-search.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
gh-searchフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
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:
gh search issues -- "bug -label:duplicate"
PowerShell:
gh --% search issues -- "bug -label:duplicate"
Why: The - prefix gets interpreted as a command flag without --. PowerShell needs --% to stop parsing.
2. Quoting Rules
Multi-word queries need quotes:
gh search issues "memory leak"
Entire query with spaces should be quoted:
gh search issues "bug label:urgent created:>2024-01-01"
Qualifier values with spaces need inner quotes:
gh search prs -- 'security label:"bug fix"'
3. Qualifier Syntax
Inline qualifiers (use within search query):
gh search repos "react stars:>1000 language:typescript"
Flag-based (use as separate flags):
gh search repos "react" --language typescript --stars ">1000"
Can mix both:
gh search issues "crash" --label bug created:>2024-01-01
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:
gh search issues -- "is:open author:@me -label:bug"
Find popular Python ML repos updated recently:
gh search repos "machine learning" --language python --stars ">1000" --updated ">2024-01-01"
Find PRs with specific label and text:
gh search prs -- 'security label:"bug fix" created:>2024-01-01'
Search code in organization repos:
gh search code "TODO" --owner myorg --language javascript
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