Agent SkillsAgent Skills
samhvw8

github-search

@samhvw8/github-search
samhvw8
12
3 forks
Updated 4/7/2026
View on GitHub

Search GitHub for repos, code, and usage examples using gh CLI. Capabilities: repo discovery, code search, finding library usage patterns, issue/PR search. Actions: search, find, discover repos/code/examples. Keywords: gh, github, search repos, search code, find examples, how to use library, stars, language filter. Use when: finding repositories, searching code patterns, discovering how libraries are used, exploring open source.

Installation

$npx agent-skills-cli install @samhvw8/github-search
Claude Code
Cursor
Copilot
Codex
Antigravity

Details

Pathdot_ccp/hub/skills/github-search/SKILL.md
Branchmaster
Scoped Name@samhvw8/github-search

Usage

After installing, this skill will be available to your AI coding assistant.

Verify installation:

npx agent-skills-cli list

Skill Instructions


name: github-search description: "Search GitHub for repos, code, and usage examples using gh CLI. Capabilities: repo discovery, code search, finding library usage patterns, issue/PR search. Actions: search, find, discover repos/code/examples. Keywords: gh, github, search repos, search code, find examples, how to use library, stars, language filter. Use when: finding repositories, searching code patterns, discovering how libraries are used, exploring open source." allowed-tools: Bash, Read

GitHub Search

Quick Commands

GoalCommand
Search reposgh search repos "<query>" --limit 30
Search codegh search code "<query>" --limit 30
Search issuesgh search issues "<query>" --limit 30
Search PRsgh search prs "<query>" --limit 30

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 repos is a convenience wrapper with its own query parsing
  • gh api search/repositories hits the raw API, matching web behavior exactly
  • Required when combining: multiple languages + topic exclusions + star filters

Common jq extractions:

Outputjq 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
gh search repos "language:python pushed:>2024-01-01"

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

QualifierExampleDescription
stars:stars:>1000, stars:100..500Star count
forks:forks:>100Fork count
language:language:rustPrimary language
topic:topic:cliRepository topic
-topic:-topic:blockchainExclude topic
pushed:pushed:>2024-01-01Last push date
created:created:>2023-01-01Creation date
license:license:mitLicense type
archived:archived:falseArchive status
is:is:public, is:privateVisibility

Code Search

QualifierExampleDescription
extension:extension:tsFile extension
path:path:src/File path
repo:repo:owner/nameSpecific repo
language:language:javascriptCode language
filename:filename:package.jsonFile name

Common Flags

FlagDescription
--limit NNumber of results (max 1000)
--sort XSort by: stars, forks, updated, best-match
--order Xasc or desc
--json FIELDSJSON output with specific fields
--webOpen 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:>2024-06-01 stars:>100" --sort=updated

Tips

  1. Quote the query when it contains special chars: gh search repos "stars:>500"
  2. Multiple languages = OR: language:rust language:go matches either
  3. Use --json for scripting: --json name,url,stargazersCount
  4. Date ranges: pushed:2024-01-01..2024-06-01
  5. Numeric ranges: stars:100..500
  6. Use gh api for complex queries: When gh search repos gives unexpected results, use gh api search/repositories?q=... for exact web parity

More by samhvw8

View all
3d-graphics
12

3D web graphics with Three.js (WebGL/WebGPU). Capabilities: scenes, cameras, geometries, materials, lights, animations, model loading (GLTF/FBX), PBR materials, shadows, post-processing (bloom, SSAO, SSR), custom shaders, instancing, LOD, physics, VR/XR. Actions: create, build, animate, render 3D scenes/models. Keywords: Three.js, WebGL, WebGPU, 3D graphics, scene, camera, geometry, material, light, animation, GLTF, FBX, OrbitControls, PBR, shadow mapping, post-processing, bloom, SSAO, shader, instancing, LOD, WebXR, VR, AR, product configurator, data visualization, architectural walkthrough, interactive 3D, canvas. Use when: creating 3D visualizations, building WebGL/WebGPU apps, loading 3D models, adding animations, implementing VR/XR, creating interactive graphics, building product configurators.

claude-ecosystem
12

Claude Code ecosystem expertise. Modules: CLI tool (setup, slash commands, MCP servers, hooks, plugins, CI/CD), extensibility (agents, skills, output styles creation), CLAUDE.md (project instructions, optimization). Actions: configure, troubleshoot, create, deploy, integrate, optimize Claude Code. Keywords: Claude Code, Anthropic, CLI tool, slash command, MCP server, Agent Skill, hook, plugin, CI/CD, enterprise, CLAUDE.md, agentic coding, agent, skill, output-style, SKILL.md, subagent, Task tool, project instructions, token optimization. Use when: learning Claude Code features, configuring settings, creating skills/agents/hooks, setting up MCP servers, troubleshooting issues, CI/CD integration, initializing or optimizing CLAUDE.md files.

design-principles
12

UI/UX design system for dashboards, admin panels, SaaS interfaces, and web apps. Stack: React, Tailwind, CSS, styled-components. Capabilities: spacing systems (4px grid), color palettes, typography hierarchy, shadows/elevation, card layouts, dark mode, component styling. Actions: design, style, beautify, fix, improve, refactor UI components. Keywords: ugly, inconsistent, cluttered, unprofessional, spacing, padding, margin, colors, fonts, shadows, cards, buttons, forms, navigation, sidebar, layout. Use when: building new UI, fixing ugly interfaces, making things look professional/modern/clean, implementing design systems, styling components, choosing colors/fonts/spacing.

git-workflow
12

Git workflow management with atomic commit principles. Capabilities: commit organization, branching strategies, merge/rebase workflows, PR management, history cleanup, staged change analysis, single-responsibility commits. Actions: commit, push, pull, merge, rebase, branch, stage, stash git operations. Keywords: git commit, git push, git pull, git merge, git rebase, git branch, git stash, atomic commit, commit message, conventional commits, branching strategy, GitFlow, trunk-based, PR, pull request, code review, git history, cherry-pick, squash, amend, interactive rebase, staged changes. Use when: organizing commits, creating branches, merging code, rebasing, writing commit messages, managing PRs, cleaning git history, analyzing staged changes.