npx claudepluginhub thebushidocollective/han --plugin githubWant just this skill?
Then install: npx claudepluginhub u/[userId]/[slug]
Search for code across GitHub repositories
This skill uses the workspace's default tool permissions.
Search GitHub Code
Name
github:search-code - Search for code across GitHub repositories
Synopsis
/search-code [arguments]
Description
Search for code across GitHub repositories
Implementation
Search for code, files, or implementations across GitHub repositories.
Usage
/search-code [query]
This command helps you find relevant code across repositories.
What This Command Does
- Accepts a search query (keywords or GitHub search syntax)
- Searches across accessible repositories using
search_code - Returns relevant code snippets with:
- File paths and line numbers
- Repository names
- Code context around matches
- Links to view full files
Prerequisites
- GitHub MCP server must be installed and configured
- OAuth authentication must be completed
Example Interaction
User: /search-code JWT token validation
Claude: Searching for "JWT token validation"...
Found 4 relevant code snippets:
### 1. my-org/auth-service - src/middleware/validateToken.ts
```typescript
export function validateJWT(token: string): UserPayload {
try {
const decoded = jwt.verify(token, process.env.JWT_SECRET);
return decoded as UserPayload;
} catch (error) {
throw new UnauthorizedError('Invalid token');
}
}
2. my-org/api-gateway - lib/security/jwt.ts
async function verifyToken(req: Request): Promise<boolean> {
const token = req.headers.authorization?.split(' ')[1];
if (!token) return false;
return await jwt.verify(token, publicKey, { algorithms: ['RS256'] });
}
Would you like to see more results or explore any of these files?
## Search Syntax
GitHub code search supports advanced syntax:
- **Exact phrase**: `"function authenticate"`
- **File type**: `language:typescript`
- **Path filter**: `path:src/auth`
- **Repository**: `repo:owner/repo-name`
- **Organization**: `org:my-org`
- **Extension**: `extension:ts`
### Examples
Find all TypeScript files with "authenticate"
authenticate language:typescript
Search in specific path
validate path:src/middleware
Search specific repository
JWT repo:my-org/auth-service
Combine filters
async function org:my-org language:javascript
## Tips
- Use specific keywords for better results
- Filter by language to reduce noise
- Search across an organization with `org:`
- Combine with path filters to narrow scope
- Use quotes for exact phrases
- Review multiple implementations for patterns
## Related Commands
- `/review-pr`: Review PRs that modify found code
- `/create-issue`: File issues for problems found
- `/create-pr`: Create PR to fix or improve code
Similar Skills
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.