Claude GitHub Copilot Skill

github-code-search

Use when you need real-world implementation examples or cross-repository context — search GitHub's global code index with the built-in MCP tools and reuse the results as grounded context.

LLM Mart · 0 points · 2 views 0 listing impressions 0 install-command copies
Download drvoss-everything-copilot-cli-skills_copilot-exclusive_github-code-search-1ca2355.zip · 1 KB

Install

skills CLI npx skills add https://github.com/drvoss/everything-copilot-cli/tree/main/skills/copilot-exclusive/github-code-search
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install drvoss-everything-copilot-cli@llmmart
Git git clone https://github.com/drvoss/everything-copilot-cli.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole drvoss/everything-copilot-cli collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

GitHub Code Search as Context

Why This is Copilot-Exclusive

Copilot CLI includes built-in GitHub MCP tools for global code search and repository inspection. That makes it practical to search for real implementations on GitHub, read the matching files, and bring the results back into your current task without leaving the CLI.

When to Use

  • You want grounded implementation examples before writing a new pattern
  • You need to compare how multiple repositories solve the same problem
  • You want to inspect real API usage instead of relying only on memory or docs
  • You need cross-repository context before making a design decision

When NOT to Use

Instead of github-code-search Use
Searching your current local repository direct search tools
GitHub Issues, PRs, or Actions workflows github-issue-triage, github-pr-workflow, or actions-debugging
Documentation-heavy research deep-research
Broad MCP setup guidance mcp-ecosystem

Workflow

1. Form a focused query

Use GitHub code search qualifiers to keep results tight:

language:TypeScript "circuit breaker" "retry"
org:microsoft path:src/auth "refresh token"
filename:SKILL.md "Use when" "GitHub MCP"

2. Search with the built-in GitHub MCP

Tool: github-mcp-server-search_code
  query: "language:TypeScript \"circuit breaker\" retry"
  perPage: 10

3. Read the most relevant files

After finding candidate matches, inspect the actual source:

Tool: github-mcp-server-get_file_contents
  owner: "example-org"
  repo: "example-repo"
  path: "src/retry.ts"

4. Reuse results as grounded context

Treat the retrieved code as external reference material:

Use the GitHub examples above as reference only.
Implement the same pattern in our repo, but adapt naming, boundaries, and tests
to local conventions.

Common Query Patterns

Goal Query example
Find API usage examples "supabase.auth.signIn" language:TypeScript
Find config patterns filename:docker-compose.yml "healthcheck" "interval"
Find error-handling conventions "catch (error)" "instanceof" language:TypeScript NOT test
Find comparable skills filename:SKILL.md "Use when" "GitHub MCP"

Combining with Other GitHub MCP Tools

search_code
  -> get_file_contents
  -> search_repositories          (with gh on PATH: gh search repos <query>)
  -> optionally inspect commits or PRs for evolution   (with gh: gh pr view <n>, gh api .../commits)

This works especially well when you need examples plus surrounding repository context.

Note: search_code and get_file_contents stay available when gh is on PATH, but Copilot CLI omits search_repositories and the commit/PR tools and the model is expected to use gh instead, e.g. gh search repos <query>, gh pr view <n>, gh api repos/{owner}/{repo}/commits. To call them via MCP, start the session with --add-github-mcp-tool=<name> for every GitHub MCP tool you need (it replaces the default set, so include search_code and get_file_contents), or --enable-all-github-mcp-tools, which also enables write tools.

Quality Check

  • Query uses qualifiers to reduce noise
  • Results come from multiple relevant sources, not one random repo
  • External examples are treated as references, not copied blindly
  • Final implementation is adapted to this repository's conventions

See Also

  • mcp-ecosystem — broader guide to built-in GitHub MCP and custom servers
  • github-pr-workflow — act on GitHub-native PR workflows once you know what to implement
  • deep-research — documentation and evidence gathering rather than code search
Files (everything-copilot-cli)
  • SKILL.md 4.2 KB
    ---
    name: github-code-search
    license: MIT
    description: Use when you need real-world implementation examples or cross-repository context — search GitHub's global code index with the built-in MCP tools and reuse the results as grounded context.
    metadata:
      category: copilot-exclusive
      copilot_feature: "Built-in GitHub MCP server (search_code, get_file_contents, search_repositories)"
    ---
    
    # GitHub Code Search as Context
    
    ## Why This is Copilot-Exclusive
    
    Copilot CLI includes built-in GitHub MCP tools for global code search and repository
    inspection. That makes it practical to search for real implementations on GitHub, read
    the matching files, and bring the results back into your current task without leaving
    the CLI.
    
    ## When to Use
    
    - You want grounded implementation examples before writing a new pattern
    - You need to compare how multiple repositories solve the same problem
    - You want to inspect real API usage instead of relying only on memory or docs
    - You need cross-repository context before making a design decision
    
    ## When NOT to Use
    
    | Instead of github-code-search | Use |
    |-------------------------------|-----|
    | Searching your current local repository | direct search tools |
    | GitHub Issues, PRs, or Actions workflows | `github-issue-triage`, `github-pr-workflow`, or `actions-debugging` |
    | Documentation-heavy research | `deep-research` |
    | Broad MCP setup guidance | `mcp-ecosystem` |
    
    ## Workflow
    
    ### 1. Form a focused query
    
    Use GitHub code search qualifiers to keep results tight:
    
    ```text
    language:TypeScript "circuit breaker" "retry"
    org:microsoft path:src/auth "refresh token"
    filename:SKILL.md "Use when" "GitHub MCP"
    ```
    
    ### 2. Search with the built-in GitHub MCP
    
    ```text
    Tool: github-mcp-server-search_code
      query: "language:TypeScript \"circuit breaker\" retry"
      perPage: 10
    ```
    
    ### 3. Read the most relevant files
    
    After finding candidate matches, inspect the actual source:
    
    ```text
    Tool: github-mcp-server-get_file_contents
      owner: "example-org"
      repo: "example-repo"
      path: "src/retry.ts"
    ```
    
    ### 4. Reuse results as grounded context
    
    Treat the retrieved code as external reference material:
    
    ```text
    Use the GitHub examples above as reference only.
    Implement the same pattern in our repo, but adapt naming, boundaries, and tests
    to local conventions.
    ```
    
    ## Common Query Patterns
    
    | Goal | Query example |
    |------|---------------|
    | Find API usage examples | `"supabase.auth.signIn" language:TypeScript` |
    | Find config patterns | `filename:docker-compose.yml "healthcheck" "interval"` |
    | Find error-handling conventions | `"catch (error)" "instanceof" language:TypeScript NOT test` |
    | Find comparable skills | `filename:SKILL.md "Use when" "GitHub MCP"` |
    
    ## Combining with Other GitHub MCP Tools
    
    ```text
    search_code
      -> get_file_contents
      -> search_repositories          (with gh on PATH: gh search repos <query>)
      -> optionally inspect commits or PRs for evolution   (with gh: gh pr view <n>, gh api .../commits)
    ```
    
    This works especially well when you need examples plus surrounding repository context.
    
    > **Note:** `search_code` and `get_file_contents` stay available when `gh` is on PATH, but Copilot CLI omits `search_repositories`
    > and the commit/PR tools and the model is expected to use `gh` instead, e.g. `gh search repos <query>`, `gh pr view <n>`, `gh api repos/{owner}/{repo}/commits`.
    > To call them via MCP, start the session with `--add-github-mcp-tool=<name>` for every GitHub MCP tool you need (it replaces the
    > default set, so include `search_code` and `get_file_contents`), or `--enable-all-github-mcp-tools`, which also enables write tools.
    
    ## Quality Check
    
    - [ ] Query uses qualifiers to reduce noise
    - [ ] Results come from multiple relevant sources, not one random repo
    - [ ] External examples are treated as references, not copied blindly
    - [ ] Final implementation is adapted to this repository's conventions
    
    ## See Also
    
    - [`mcp-ecosystem`](../mcp-ecosystem/SKILL.md) — broader guide to built-in GitHub MCP and custom servers
    - [`github-pr-workflow`](../github-pr-workflow/SKILL.md) — act on GitHub-native PR workflows once you know what to implement
    - [`deep-research`](../../workflow/deep-research/SKILL.md) — documentation and evidence gathering rather than code search
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.