gh-clilisted
Install: claude install-skill tenequm/skills
# GitHub CLI - Remote Analysis & Discovery
Remote repository operations, codebase comparison, and code discovery without cloning.
## When to Use
- Analyze repositories without cloning
- Compare codebases side-by-side
- Fetch specific files from any repo
- Find trending repositories and code patterns
- Search code across GitHub
## Quick Operations
### Fetch a file remotely
```bash
gh api repos/OWNER/REPO/contents/path/file.ts --template '{{.content | base64decode}}'
```
### Get directory listing
```bash
gh api repos/OWNER/REPO/contents/PATH
```
### Search code
```bash
gh search code "pattern" --language=typescript
```
### Find trending repos
```bash
gh search repos --language=rust --sort stars --order desc
```
## Compare Two Codebases
Systematic workflow for comparing repositories to identify similarities and differences.
**Example use**: "Compare solana-fm/explorer-kit and tenequm/solana-idls"
### Step 1: Fetch directory structures
```bash
gh api repos/OWNER-A/REPO-A/contents/PATH
gh api repos/OWNER-B/REPO-B/contents/PATH
```
If comparing a monorepo package, specify the path (e.g., `packages/explorerkit-idls`).
### Step 2: Compare file lists
```bash
gh api repos/OWNER-A/REPO-A/contents/PATH -q '.[].name'
gh api repos/OWNER-B/REPO-B/contents/PATH -q '.[].name'
```
Compare the output of each command to identify files unique to each repo and common files.
### Step 3: Fetch key files for comparison
Compare package dependencies:
```bash
gh api repos/OWNER-A