github

rakibdev 的头像作者 rakibdev

用于搜索单个存储库或全局的代码/问题。评论/审查 Pull Request。

📖 中文导读:用于搜索单个存储库或全局的代码/问题。评论/审查 Pull Request。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

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:tsx and path: if unique (e.g. config files).
  • Always use substrings to match wide results (e.g. components/ui, tiptap matches 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 by updated to 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 diff to identify specific code blocks
  • Make separate comments on specific lines instead of a single top-level review