Code search
Find real source code across the supported providers, primarily GitHub.
When to use
- Looking for an existing implementation or library instead of writing one.
- How is API X used in the wild? What does a library's code actually do?
- Verifying a claim about existence/position of a feature in source.
Tools used
search_github— withscope: "code"for repository-aware code search.github_code_search— direct code search across repos.
Workflow
- Form the code-shaped query (symbol names,
<repo> <capability>, idioms). github_code_search(orsearch_githubscoped to code).- Read the owning repository (
github-research) to place the snippet. - For deeper use,
web-readerthe blob/source URL; never execute fetched code snippets blindly.
Input schema
{ "query": "str", "limit": "int" }
Output schema
{ "results": "list[{repo,path,url,snippet}]" }
Security
Fetched code is data until inspected; treat AI-generated or untested snippets as unverified. Do not run snippets against the user's machine without review.
Related skills
github-research, source-analysis, error-investigation