github-code-search

Generate GitHub code search queries with qualifiers, boolean logic, and regex.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/mpsuesser/workspace --skill github-code-search-mpsuesser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-code-search
Source: https://github.com/mpsuesser/workspace/tree/main/dotconfig/opencode/skills/github-code-search
Command: npx skills add https://github.com/mpsuesser/workspace --skill github-code-search-mpsuesser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of writing effective GitHub code search queries so you can locate the exact code, symbols, or patterns you need without manually scanning repositories.

Core Features & Use Cases

  • Qualifier-based precision: Use qualifiers like repo:, org:, language:, path:, symbol:, content:, and is: to narrow results to the right scope.
  • Boolean query logic: Combine terms with AND, OR, and NOT, including parentheses, to include or exclude what you want.
  • Advanced pattern matching: Use regular expressions with /.../ and control exact-string matching with quotes, including escaped quotes/backslashes.
  • Path globbing: Use glob patterns in qualifiers (including *, **, and ?) to match files by path patterns.
  • Use Case: When debugging a bug you suspect is caused by a specific function call or configuration fragment, you can search a single repo for the symbol definition and then refine by language and path to quickly pinpoint the relevant file.

Quick Start

Use the github-code-search skill to build a GitHub code search query for your target repo, language, and path pattern, then run it in GitHub to retrieve matching results.

Frequently Asked Questions about github-code-search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search for a specific symbol definition in a GitHub repository?

To search for a specific symbol definition, use the `symbol:` qualifier combined with `repo:` to narrow the scope. This generates a GitHub code search query that accurately locates the exact function or class definition within your target repository.

Can I use regular expressions to find code patterns on GitHub?

Yes, you can use regular expressions for GitHub code search by delimiting the pattern with forward slashes, like `/regex_pattern/`. This allows advanced pattern matching to locate specific code structures or configurations across repositories.

How do I exclude specific files or directories from a GitHub code search?

You can exclude files from a GitHub code search by applying boolean `NOT` logic with parentheses to filter out unwanted terms. Additionally, use the `path:` qualifier with glob patterns to restrict results to specific directories.

What is the best way to search for exact string matches in GitHub code?

The best way to search for exact string matches is by enclosing your search term in quotes. This ensures GitHub looks for the exact string sequence, preventing partial matches and reducing noise in your search results.

Does GitHub code search support filtering by file path and language?

Yes, GitHub code search supports filtering by file path and language using the `path:` and `language:` qualifiers. You can use glob patterns like `*` and `**` within the path qualifier to match complex file structures.

How do I combine multiple search terms with boolean logic in GitHub?

You can combine multiple search terms in GitHub code search using `AND`, `OR`, and `NOT` boolean operators with parentheses. This allows you to build complex queries that include required terms while excluding noise.