private-github-search
できること
このスキルは、非公開のものを含むGitHubリポジトリのローカルコピーを検索し、コードやテキストがどこにあるかを見つけます。どのリポジトリに何があるか覚えていない開発者向けです。
使う場面
- ✓どのリポジトリに特定のコードがあるか思い出せないとき。
- ✓すべてのプロジェクトのうち、特定の関数や設定をどこに書いたかを探したいとき。
- ✓GitHub自体の検索では、非公開のリポジトリの結果が見つからないとき。
スキルのリンク
https://github.com/ykdojo/claude-code-tips/blob/main/skills/private-github-search/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Stripeのwebhookハンドラーをどこに書いたか、すべてのリポジトリから探してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、リポジトリのメインブランチのローカルコピーを保持し、定期的に更新して、そこで高速なテキスト検索を実行します。コピーは、あなたが選んだGitHubアカウントから一度だけ設定します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Private GitHub search
GitHub's modern code search (the one that indexes private repos) is web-only; gh search code uses the legacy engine and often returns nothing for private repos. Instead, search a local mirror of all the user's repos - it covers the same content as GitHub's index (default branch, non-fork) and a full search takes milliseconds.
Searching
Find the bundled sync script (works for plugin installs and manual symlinks):
find ~/.claude ~/.codex -name "private-github-search-sync.sh" 2>/dev/null | sort -V | tail -1
Always refresh first - it exits instantly if the mirror was synced within the last hour, and takes ~15s otherwise (--force syncs regardless of age):
bash <script-path>
rg -il 'pattern' ~/repo-mirror/repos # which files
rg -in 'pattern' ~/repo-mirror/repos | head # matching lines
First-time setup
If ~/repo-mirror/owners.txt doesn't exist: ask the user which GitHub accounts to mirror (don't guess - they may manage several), write them one per line to ~/repo-mirror/owners.txt, then run the sync script in the background (initial clone takes a few minutes; needs gh auth with access to those accounts).
Caveats
- Only the default-branch tip is mirrored - for history or other branches, use
git log -Sin a full clone or GitHub web search. - The mirror may contain private data: keep it out of synced folders and never commit or publish its contents.
よくある質問
古いブランチも検索しますか?
いいえ。各リポジトリのメインブランチだけを対象にします。他のブランチはgit logやGitHubの検索を使ってください。
どのアカウントを検索しますか?
設定の際にあなたが指定したGitHubアカウントだけです。そのため、このスキルはどのアカウントをコピーするかを尋ねます。
ローカルのコピーは共有しても安全ですか?
コピーには非公開のデータが含まれることがあるため、同期されるフォルダには入れないでください。
詳細
作者による元の説明
Full-text search across all of the user's GitHub repos (including private ones) using a local mirror and ripgrep. Use for "where did I put X", "which repo has X", or any search spanning the user's repos - gh search code / the REST API cannot reliably search private repos.
repo: ykdojo/claude-code-tips
人気
- GitHubのスター
- 10k
- ランキング
- #11902
- ライセンス
- —
- 更新日
- 2026/9/25
コメント
- …
このリポジトリの他のスキル
gha
10kエージェントが、GitHub Actionsのワークフローが失敗した理由と、同じジョブが繰り返し失敗しているかどうかを調べられるよう支援します。
half-clone
10kエージェントが、長いチャットの後半を新しいセッションにコピーできるよう支援します。最近の作業を残しつつ、使用するトークンを減らせます。
handoff
10kエージェントが、新しいチャットがプロジェクトを、明確な目標、進捗、次のステップとともに引き継げるように、引き継ぎ文書を書けるよう支援します。
hn-summarize
10kエージェントが、公式のHacker Newsのデータを使い、人気の記事の上位、または指定した1つの記事とそのコメントを要約できるよう支援します。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。