github-search

SiTaggart 的头像作者 SiTaggart

通过gh CLI搜索GitHub代码、仓库、问题和PR。

📖 中文导读:通过gh CLI搜索GitHub代码、仓库、问题和PR。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: github-search description: Search GitHub code, repositories, issues, and PRs via gh CLI allowed-tools: [Bash, Read]

GitHub Search Skill

When to Use

  • Search code across repositories
  • Find issues or PRs
  • Look up repository information

Instructions

gh search <type> <query> [flags]

Parameters

  • <type>: Search type - code, repos, issues, prs
  • <query>: Search query (supports GitHub search syntax)
  • --owner: (optional) Filter by repo owner (all search types)
  • --repo: (optional) Filter by repo name (code/issues/prs only)
  • --limit: (optional) Max results to fetch
  • --: (optional) Use before the query when it contains a - qualifier, e.g. -- "bug -label:critical"

Examples

# Search code
gh search code "authentication language:python"

# Search issues
gh search issues "bug label:critical" --owner "anthropics"

# Search pull requests in a repo
gh search prs "is:open review:required" --repo "cli/cli"

Requirements

Requires GitHub CLI (gh) to be installed and authenticated (gh auth status or gh auth login).