# private-github-search

This skill searches public and private GitHub repositories through a local mirror. Use it when you need to locate code or files across several repositories.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · ★ 10273
- Author: ykdojo
- License: LicenseRef-Proprietary · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ykdojo/claude-code-tips/tree/HEAD/skills/private-github-search/SKILL.md
- Updated: 2026-09-25
- HTML: https://affpapa.org/en/nevibecode/skills/private-github-search

## What it does

The skill keeps a local copy of selected GitHub repositories under `~/repo-mirror` and runs text searches with `rg`. It refreshes the mirror before searching; a recent sync is reused, while `--force` requests a new one. Results can show matching files or the lines that contain the pattern.

For the first setup, put the GitHub accounts to mirror into `~/repo-mirror/owners.txt`, one per line. The initial clone needs `gh` authentication with access to those accounts. The mirror contains the tip of each default branch for non-fork repositories, so history and other branches require a full clone. Treat the mirror as private data and keep it away from synced folders and published commits.

## Requirements
- Works with: GitHub

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add ykdojo/claude-code-tips --skill private-github-search -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/private-github-search/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/private-github-search/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add ykdojo/claude-code-tips --skill private-github-search -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/private-github-search/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add ykdojo/claude-code-tips --skill private-github-search -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/private-github-search/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install ykdojo/claude-code-tips private-github-search
```

2. **Manually: put the files in place**
- File: `.github/skills/private-github-search/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add ykdojo/claude-code-tips --skill private-github-search -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/ykdojo/claude-code-tips --path skills/private-github-search
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/private-github-search/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add ykdojo/claude-code-tips --skill private-github-search -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ykdojo/claude-code-tips/tree/HEAD/skills/private-github-search/SKILL.md

## When to use it
- locate a file across private GitHub repositories
- find which repository contains a code fragment
- search matching lines with `rg`
- refresh a local repository mirror before searching

## Example prompts
- Find which of my repositories contains the `featureFlag` setting.
- Refresh the GitHub mirror and list files containing `DATABASE_URL`.
- Search all my repositories for lines that mention `webhook`.

## Similar
- [triage](https://affpapa.org/en/nevibecode/skills/triage.md) — skill · 990453 installs
- [code-review](https://affpapa.org/en/nevibecode/skills/code-review.md) — skill · 789521 installs
- [implement](https://affpapa.org/en/nevibecode/skills/implement.md) — skill · 774700 installs
- [git-guardrails-claude-code](https://affpapa.org/en/nevibecode/skills/git-guardrails-claude-code.md) — skill · 499069 installs
- [setup-pre-commit](https://affpapa.org/en/nevibecode/skills/setup-pre-commit.md) — skill · 489289 installs
- [scaffold-exercises](https://affpapa.org/en/nevibecode/skills/scaffold-exercises.md) — skill · 480196 installs

From the same set: [ykdojo/claude-code-tips](https://affpapa.org/en/nevibecode/by/ykdojo/claude-code-tips.md) — 4 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
