github
Use for searching code/issues of single repo or globally. Comment/review PRs.
When & Why to Use This Skill
This Claude skill provides a comprehensive integration with GitHub, enabling users to search code, issues, and repositories globally or within specific projects. It streamlines the software development lifecycle by allowing the AI to browse repository structures, fetch file contents, and perform complex Pull Request operations such as reviewing diffs and posting inline comments.
Use Cases
- Codebase Auditing: Search for specific patterns, deprecated API usage, or security vulnerabilities across multiple repositories using advanced grep-like queries.
- Automated Code Review: Streamline the PR process by fetching raw diffs and providing precise, line-specific feedback and suggestions directly on GitHub.
- Issue & Knowledge Discovery: Quickly locate relevant issues or discussions to troubleshoot bugs or gather context for new feature implementations.
- Open Source Research: Discover and evaluate high-quality repositories by filtering by topics, star counts, and recent activity to find the best tools for a project.
| name | github |
|---|---|
| description | Browse GitHub URLs (don't use webfetch), repos, issues, search code and manage PR. |
| pattern | github\.com/[\w-]+/[\w-]+ |
Browse
URL contains blob (file), tree (dir), issues/... or pull/....
bun {dir}/scripts/fetch.ts <github_url>
Code Search
bun {dir}/scripts/grep.ts <query> [--page N]
bun {dir}/scripts/grep.ts 'useQuery filename:\*.tsx' # global
bun {dir}/scripts/grep.ts 'useQuery repo:opencode-ai/opencode' # single repo
- Use combination of import name, and
lang:tsxandpath:if unique (e.g. config files). - Always use substrings to match wide results (e.g.
components/ui,tiptapmatches two lib imports)
Search Repos
bun {dir}/scripts/search-repos.ts <query> [--page N] [--stars N] [--sort updated|best-match]
bun {dir}/scripts/search-repos.ts 'topic:neovim' --stars 1000 --sort best-match
- Use 1-2 generic terms (framework name) for wide results. Read at least 3 pages.
- Narrow by language:
lang:ts - Default is
stars:100(minimum) and sorted byupdatedto find underrated repos.
Search Issues
bun {dir}/scripts/search-issues.ts <query>
Pull Request Operations
bun {dir}/scripts/pr.ts <owner> <repo> <pr_number> <method> [...args]
bun {dir}/scripts/pr.ts facebook react 35404 comment src/index.ts 10 15 'This block could be refactored'
- `diff` - Raw diff
- `files` - Changed files list
- `comment ` - Add comment on single line
- `comment ` - Add comment on line range
- `reply ` - Reply to existing comment
- When reviewing a PR, first use
diffto identify specific code blocks - Make separate comments on specific lines instead of a single top-level review