gh-cli

Solid

GitHub CLI for remote repository analysis, file fetching, codebase comparison, and discovering trending code/repos. Use when analyzing repos without cloning, comparing codebases, or searching for popular GitHub projects.

AI & Automation 31 stars 2 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 85/100

Stars 20%
50
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 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 repo read-file path/file.ts --repo OWNER/REPO ``` `gh repo read-file` (preview) is the preferred path: it prints raw content, takes `--ref` for any branch/tag/commit, and handles files above the Contents API's 1MB inline limit. Fall back to `gh api` where the command is unavailable: ```bash gh api repos/OWNER/REPO/contents/path/file.ts -H "Accept: application/vnd.github.raw" ``` There is **no `base64decode` template function** - `--template '{{.content | base64decode}}'` fails with `function "base64decode" not defined`. To decode the default JSON response, pipe it: ```bash gh api repos/OWNER/REPO/contents/path/file.ts --jq '.content' | base64 -d ``` ### Get directory listing ```bash gh repo read-dir PATH --repo OWNER/REPO # Or via the API gh api repos/OWNER/REPO/contents/PATH ``` ### Pin the repo in scripted workflows `gh` infers the repository from the current working directory. In agent or CI workflows - where a `cd` may persist - always pass `--repo OWNER/REPO` so a stray cwd cannot silently retarget the command. ### Search code ```bash gh search code "pattern" --language=types...

Details

Author
tenequm
Repository
tenequm/skills
Created
8 months ago
Last Updated
3 days ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category