KS
Killer-Skills

gh-search — Categories.community

v1.0.0
GitHub

About this Skill

Ideal for CLI Agents requiring advanced GitHub search functionality with exclusion support The most comprehensive Claude Code skills registry | Web Search: https://skills-registry-web.vercel.app

majiayu000 majiayu000
[0]
[0]
Updated: 2/20/2026

Quality Score

Top 5%
75
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add majiayu000/claude-skill-registry/gh-search

Agent Capability Analysis

The gh-search MCP Server by majiayu000 is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion.

Ideal Agent Persona

Ideal for CLI Agents requiring advanced GitHub search functionality with exclusion support

Core Value

Empowers agents to perform complex GitHub searches using `gh search` subcommands with qualifiers, handling exclusions with `--` prefixes and queries containing spaces or special characters via the GitHub CLI

Capabilities Granted for gh-search MCP Server

Searching GitHub repositories for specific code snippets
Constructing complex queries with multiple qualifiers for issues or PRs
Utilizing `--` prefixes for exclusion searches

! Prerequisites & Limits

  • Requires GitHub CLI installation
  • Shell interpretation limitations for queries with `-` prefixes without `--`
Project
SKILL.md
4.2 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

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 gh CLI 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

SubcommandUse ForCommon Flags
gh search issuesIssues (add --include-prs for PRs too)--label, --state, --author, --assignee
gh search prsPull requests only--label, --state, --author, --draft, --merged
gh search reposRepositories--language, --stars, --topic, --owner
gh search codeCode within files--repo, --language, --filename
gh search commitsCommit messages--repo, --author, --committer

Critical Syntax Rules

1. Exclusions Require -- Flag

Unix/Linux/Mac:

bash
1gh search issues -- "bug -label:duplicate"

PowerShell:

powershell
1gh --% 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:

bash
1gh search issues "memory leak"

Entire query with spaces should be quoted:

bash
1gh search issues "bug label:urgent created:>2024-01-01"

Qualifier values with spaces need inner quotes:

bash
1gh search prs -- 'security label:"bug fix"'

3. Qualifier Syntax

Inline qualifiers (use within search query):

bash
1gh search repos "react stars:>1000 language:typescript"

Flag-based (use as separate flags):

bash
1gh search repos "react" --language typescript --stars ">1000"

Can mix both:

bash
1gh 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-01 or created:2024-01-01..2024-12-31

Field-Specific Search

  • in:title - Search in title only
  • in:body - Search in body only
  • in:comments - Search in comments only

Exclusions

  • -qualifier:value - Exclude: -label:bug, -language:javascript
  • NOT keyword - For words only: "hello NOT world"

Examples

Find your open issues without bug label:

bash
1gh search issues -- "is:open author:@me -label:bug"

Find popular Python ML repos updated recently:

bash
1gh search repos "machine learning" --language python --stars ">1000" --updated ">2024-01-01"

Find PRs with specific label and text:

bash
1gh search prs -- 'security label:"bug fix" created:>2024-01-01'

Search code in organization repos:

bash
1gh search code "TODO" --owner myorg --language javascript

Common Mistakes

MistakeProblemFix
gh search issues -label:bug-label interpreted as flagAdd --: gh search issues -- "-label:bug"
gh search repos machine learningSearches "machine" OR "learning"Quote it: "machine learning"
in:title outside quotesShell interprets : oddlyInclude in query: "crash in:title"
Mixing @ with valueInvalid syntaxUse @me or username, not both: author:@me ✓, author:@username ✗ (drop @)
PowerShell without --%Parsing breaks with exclusionsAdd 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

Related Skills

Looking for an alternative to gh-search or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication