searching-sourcegraph

star 1

Use when the user needs to search or navigate code with Sourcegraph (public or private) using the provided sg_* tools.

sourcegraph-community By sourcegraph-community schedule Updated 2/19/2026

name: searching-sourcegraph description: Use when the user needs to search or navigate code with Sourcegraph (public or private) using the provided sg_* tools.

Searching Sourcegraph

You have access to Sourcegraph search and file retrieval tools.

Tools

  • nls_search({ query }): Semantic search.
  • keyword_search({ query }): Keyword/regex search.
  • read_file({ repo, path, startLine?, endLine?, revision? }): Read file contents.
  • list_repos({ query, limit?, after?, before? }): Find relevant repos.
  • list_files({ repo, path?, revision? }): List files/directories.
  • go_to_definition({ repo, path, symbol, revision? }): Navigate to definitions.
  • find_references({ repo, path, symbol, revision? }): Find references.

Workflow

  1. Start with a tight query (use repo:, file:, lang:, type: if applicable).
  2. If results are broad, add constraints and retry.
  3. For a promising match, fetch the file with read_file and read surrounding context.
  4. Iterate: refine the query based on what you learned.

Prefer nls_search to explore, then narrow with keyword_search.

Query Tips

  • Prefer repo:^github\\.com/org/repo$ for exact repo matches.
  • Use file:\\.(go|ts|py)$ to constrain by extension.
  • Use type:symbol to find definitions; type:file for file content.
Install via CLI
npx skills add https://github.com/sourcegraph-community/sourcegraph-gemini --skill searching-sourcegraph
Repository Details
star Stars 1
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator
sourcegraph-community
sourcegraph-community Explore all skills →