skills/github-code-search/SKILL.md
Search GitHub code across millions of repositories using grep.app. Use when you need to find code patterns, implementations, examples, or understand how features are built in public codebases. (project)
npx skillsauth add jaredpalmer/claude-plugins github-code-searchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill enables searching across millions of public GitHub repositories using the grep.app service. It uses a code mode pattern where you write and execute TypeScript code to query the grep.app MCP server, filter results locally, and return only relevant findings.
The grep.app MCP server must be configured. Add it with:
claude mcp add --transport http grep https://mcp.grep.app
Verify with /mcp - you should see grep listed.
Instead of calling MCP tools directly (which loads all tool definitions into context), this skill uses code execution for efficiency:
bun or npx tsxThis approach reduces token usage by 90%+ compared to direct tool calls with large result sets.
A ready-to-use TypeScript search script is included:
bun run skills/github-code-search/scripts/search.ts "query" [--lang=Language] [--repo=owner/repo] [--limit=N] [--regexp]
Examples:
# Search for "use cache" in TypeScript files
bun run skills/github-code-search/scripts/search.ts "use cache" --lang=TypeScript --limit=5
# Search in a specific repository
bun run skills/github-code-search/scripts/search.ts "cacheLife" --repo=vercel/next.js --limit=10
# Use regex patterns
bun run skills/github-code-search/scripts/search.ts "async.*await" --regexp --lang=TypeScript
Output format (JSON):
{
"query": "cacheLife",
"options": { "language": "TypeScript", "limit": 3 },
"total": 2931,
"results": [
{
"repo": "vercel/next.js",
"path": "packages/next/src/server/use-cache/cache-life.ts",
"url": "https://github.com/vercel/next.js/blob/canary/packages/next/src/server/use-cache/cache-life.ts",
"matches": [{ "lineNumber": 5, "content": "export type »CacheLife« = {" }]
}
]
}
The » and « markers indicate where the search term was matched.
For more complex searches with custom filtering, write inline TypeScript:
// Execute with: bun -e "..."
const response = await fetch(
'https://grep.app/api/search?q=useOptimistic&l=TypeScript'
)
const data = await response.json()
// Process results locally - this is the efficiency gain!
const filtered = data.hits.hits
.filter((hit: any) => hit.repo.includes('react'))
.slice(0, 5)
.map((hit: any) => ({ repo: hit.repo, path: hit.path }))
console.log(JSON.stringify(filtered, null, 2))
For simple searches, use curl directly:
curl -s "https://grep.app/api/search?q=useOptimistic+hook&l=TypeScript" | jq '.hits.hits[:5] | .[] | {repo: .repo.raw, path: .path.raw}'
| Parameter | Description | Example |
| --------- | ---------------------------------------------------------- | ---------------------------------- |
| q | Search query (required). Supports regex with regexp:true | "use cache", async.*await |
| l | Language filter | TypeScript, Python, Go |
| r | Repository filter | vercel/next.js, facebook/react |
| regexp | Enable regex mode | true |
curl -s "https://grep.app/api/search?q=%22use%20cache%22&l=TypeScript" | jq '.hits.hits[:10] | .[] | {repo: .repo.raw, path: .path.raw}'
curl -s "https://grep.app/api/search?q=catch.*error.*log®exp=true&l=TypeScript" | jq '.hits.total'
curl -s "https://grep.app/api/search?q=cacheLife&r=vercel/next.js" | jq '.hits.hits[] | {path: .path.raw, lines: .content.lines}'
regexp=true for complex pattern matchingIf the grep MCP server is configured, you can also use it via MCP tools:
// Via MCP (if mcp__grep__search is available)
mcp__grep__search({
query: 'authentication middleware',
language: 'TypeScript',
useRegexp: false,
})
However, the code mode approach (curl + jq or TypeScript script) is preferred for:
development
Review Next.js App Router code for optimal Partial Prerendering (PPR), caching strategy, Suspense boundaries, and React Query integration. Ensure adherence to Next.js 16+ Cache Components best practices.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.