{"id":"6bc98d05-a3ef-435c-9fe0-78c2232560b8","shortId":"zNeWEL","kind":"skill","title":"gh-cli","tagline":"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.","description":"# GitHub CLI - Remote Analysis & Discovery\n\nRemote repository operations, codebase comparison, and code discovery without cloning.\n\n## When to Use\n\n- Analyze repositories without cloning\n- Compare codebases side-by-side\n- Fetch specific files from any repo\n- Find trending repositories and code patterns\n- Search code across GitHub\n\n## Quick Operations\n\n### Fetch a file remotely\n\n```bash\ngh api repos/OWNER/REPO/contents/path/file.ts --template '{{.content | base64decode}}'\n```\n\n### Get directory listing\n\n```bash\ngh api repos/OWNER/REPO/contents/PATH\n```\n\n### Search code\n\n```bash\ngh search code \"pattern\" --language=typescript\n```\n\n### Find trending repos\n\n```bash\ngh search repos --language=rust --sort stars --order desc\n```\n\n## Compare Two Codebases\n\nSystematic workflow for comparing repositories to identify similarities and differences.\n\n**Example use**: \"Compare solana-fm/explorer-kit and tenequm/solana-idls\"\n\n### Step 1: Fetch directory structures\n\n```bash\ngh api repos/OWNER-A/REPO-A/contents/PATH\ngh api repos/OWNER-B/REPO-B/contents/PATH\n```\n\nIf comparing a monorepo package, specify the path (e.g., `packages/explorerkit-idls`).\n\n### Step 2: Compare file lists\n\n```bash\ngh api repos/OWNER-A/REPO-A/contents/PATH -q '.[].name'\ngh api repos/OWNER-B/REPO-B/contents/PATH -q '.[].name'\n```\n\nCompare the output of each command to identify files unique to each repo and common files.\n\n### Step 3: Fetch key files for comparison\n\nCompare package dependencies:\n\n```bash\ngh api repos/OWNER-A/REPO-A/contents/package.json --template '{{.content | base64decode}}'\ngh api repos/OWNER-B/REPO-B/contents/package.json --template '{{.content | base64decode}}'\n```\n\nCompare main entry points:\n\n```bash\ngh api repos/OWNER-A/REPO-A/contents/src/index.ts --template '{{.content | base64decode}}'\ngh api repos/OWNER-B/REPO-B/contents/src/index.ts --template '{{.content | base64decode}}'\n```\n\n### Step 4: Analyze differences\n\nCompare the fetched files to identify:\n\n**API Surface**\n- What functions/classes are exported?\n- Are the APIs similar or completely different?\n\n**Dependencies**\n- Shared dependencies (same approach)\n- Different dependencies (different implementation)\n\n**Unique Features**\n- Features only in repo1\n- Features only in repo2\n\nFor detailed comparison strategies, see [references/comparison.md](references/comparison.md).\n\n## Discover Trending Content\n\n### Find trending repositories\n\n```bash\n# Most starred repos\ngh search repos --sort stars --order desc --limit 20\n\n# Trending in specific language\ngh search repos --language=rust --sort stars --order desc\n\n# Recently popular (created in last month)\ngh search repos \"created:>2024-10-01\" --sort stars --order desc\n\n# Trending in specific topic\ngh search repos \"topic:machine-learning\" --sort stars --order desc\n```\n\n### Discover popular code patterns\n\n```bash\n# Find popular implementations\ngh search code \"function useWallet\" --language=typescript --sort indexed\n\n# Find code in popular repos only\ngh search code \"implementation\" \"stars:>1000\"\n\n# Search specific organization\ngh search code \"authentication\" --owner=anthropics\n```\n\nFor complete discovery queries and patterns, see [references/discovery.md](references/discovery.md).\n\n## Search Basics\n\n### Code search\n\n```bash\n# Search across all repositories\ngh search code \"API endpoint\" --language=python\n\n# Search in specific organization\ngh search code \"auth\" --owner=anthropics\n\n# Exclude results with negative qualifiers\ngh search issues -- \"bug report -label:wontfix\"\n```\n\n### Issue & PR search\n\n```bash\n# Find open bugs\ngh search issues --label=bug --state=open\n\n# Search assigned issues\ngh search issues --assignee=@me --state=open\n```\n\nFor advanced search syntax, see [references/search.md](references/search.md).\n\n## Special Syntax\n\n### Field name inconsistencies\n\n**IMPORTANT:** GitHub CLI uses inconsistent field names across commands:\n\n| Field | `gh repo view` | `gh search repos` |\n|-------|----------------|-------------------|\n| Stars | `stargazerCount` | `stargazersCount` |\n| Forks | `forkCount` | `forksCount` |\n\n**Examples:**\n\n```bash\n# ✅ Correct for gh repo view\ngh repo view owner/repo --json stargazerCount,forkCount\n\n# ✅ Correct for gh search repos\ngh search repos \"query\" --json stargazersCount,forksCount\n```\n\n### Excluding search results\n\nWhen using negative qualifiers (like `-label:bug`), use `--` to prevent the hyphen from being interpreted as a flag:\n\n```bash\ngh search issues -- \"query -label:bug\"\n```\n\nFor more syntax gotchas, see [references/syntax.md](references/syntax.md).\n\n## Advanced Workflows\n\nFor detailed documentation on specific workflows:\n\n**Core Workflows:**\n- [remote-analysis.md](references/remote-analysis.md) - Advanced file fetching patterns\n- [comparison.md](references/comparison.md) - Complete codebase comparison guide\n- [discovery.md](references/discovery.md) - All trending and discovery queries\n- [search.md](references/search.md) - Advanced search syntax\n- [syntax.md](references/syntax.md) - Special syntax and command quirks\n\n**GitHub Operations:**\n- [repositories.md](references/repositories.md) - Repository operations\n- [pull_requests.md](references/pull_requests.md) - PR workflows\n- [issues.md](references/issues.md) - Issue management\n- [actions.md](references/actions.md) - GitHub Actions\n- [releases.md](references/releases.md) - Release management\n\n**Setup & Configuration:**\n- [getting_started.md](references/getting_started.md) - Installation and auth\n- [other.md](references/other.md) - Environment variables, aliases, config\n- [extensions.md](references/extensions.md) - CLI extensions\n\n## Resources\n\n- Official docs: https://cli.github.com/manual/\n- GitHub CLI: https://github.com/cli/cli\n- Search syntax: https://docs.github.com/en/search-github","tags":["cli","skills","tenequm","agent-skills","ai-agents","claude-code","claude-skills","clawhub","erc-8004","mpp","openclaw","solana"],"capabilities":["skill","source-tenequm","skill-gh-cli","topic-agent-skills","topic-ai-agents","topic-claude-code","topic-claude-skills","topic-clawhub","topic-erc-8004","topic-mpp","topic-openclaw","topic-skills","topic-solana","topic-x402"],"categories":["skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/tenequm/skills/gh-cli","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add tenequm/skills","source_repo":"https://github.com/tenequm/skills","install_from":"skills.sh"}},"qualityScore":"0.461","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 23 github stars · SKILL.md body (5,745 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T01:01:39.649Z","embedding":null,"createdAt":"2026-04-18T23:05:16.427Z","updatedAt":"2026-04-22T01:01:39.649Z","lastSeenAt":"2026-04-22T01:01:39.649Z","tsv":"'-01':327 '-10':326 '/cli/cli':641 '/en/search-github':646 '/explorer-kit':137 '/manual/':636 '1':141 '1000':375 '2':163 '20':301 '2024':325 '3':195 '4':235 'across':74,400,475 'action':609 'actions.md':606 'advanc':457,551,563,582 'alias':625 'analysi':9,35 'analyz':20,50,236 'anthrop':384,419 'api':84,94,147,150,169,174,206,212,223,229,244,252,406 'approach':261 'assign':447 'assigne':452 'auth':417,620 'authent':382 'base64decode':88,210,216,227,233 'bash':82,92,98,108,145,167,204,221,289,351,398,435,491,537 'basic':395 'bug':428,438,443,525,543 'cli':3,5,33,470,629,638 'cli.github.com':635 'cli.github.com/manual/':634 'clone':23,46,53 'code':43,70,73,97,101,349,357,365,372,381,396,405,416 'code/repos':17 'codebas':12,25,40,55,120,570 'command':183,476,590 'common':192 'compar':24,54,118,124,133,153,164,178,201,217,238 'comparison':13,41,200,278,571 'comparison.md':567 'complet':255,386,569 'config':626 'configur':615 'content':87,209,215,226,232,285 'core':559 'correct':492,504 'creat':317,324 'depend':203,257,259,263 'desc':117,299,314,331,346 'detail':277,554 'differ':130,237,256,262,264 'directori':90,143 'discov':15,283,347 'discoveri':36,44,387,578 'discovery.md':573 'doc':633 'docs.github.com':645 'docs.github.com/en/search-github':644 'document':555 'e.g':160 'endpoint':407 'entri':219 'environ':623 'exampl':131,490 'exclud':420,516 'export':249 'extens':630 'extensions.md':627 'featur':267,268,272 'fetch':11,60,78,142,196,240,565 'field':465,473,477 'file':10,62,80,165,186,193,198,241,564 'find':66,105,286,352,364,436 'flag':536 'fm':136 'fork':487 'forkcount':488,503 'forkscount':489,515 'function':358 'functions/classes':247 'get':89 'getting_started.md':616 'gh':2,83,93,99,109,146,149,168,173,205,211,222,228,293,306,321,336,355,370,379,403,414,425,439,449,478,481,494,497,506,509,538 'gh-cli':1 'github':4,30,32,75,469,592,608,637 'github.com':640 'github.com/cli/cli':639 'gotcha':547 'guid':572 'hyphen':530 'identifi':127,185,243 'implement':265,354,373 'import':468 'inconsist':467,472 'index':363 'instal':618 'interpret':533 'issu':427,432,441,448,451,540,604 'issues.md':602 'json':501,513 'key':197 'label':430,442,524,542 'languag':103,112,305,309,360,408 'last':319 'learn':342 'like':523 'limit':300 'list':91,166 'machin':341 'machine-learn':340 'main':218 'manag':605,613 'monorepo':155 'month':320 'name':172,177,466,474 'negat':423,521 'offici':632 'open':437,445,455 'oper':39,77,593,597 'order':116,298,313,330,345 'organ':378,413 'other.md':621 'output':180 'owner':383,418 'owner/repo':500 'packag':156,202 'packages/explorerkit-idls':161 'path':159 'pattern':71,102,350,390,566 'point':220 'popular':29,316,348,353,367 'pr':433,600 'prevent':528 'project':31 'pull_requests.md':598 'python':409 'q':171,176 'qualifi':424,522 'queri':388,512,541,579 'quick':76 'quirk':591 'recent':315 'references/actions.md':607 'references/comparison.md':281,282,568 'references/discovery.md':392,393,574 'references/extensions.md':628 'references/getting_started.md':617 'references/issues.md':603 'references/other.md':622 'references/pull_requests.md':599 'references/releases.md':611 'references/remote-analysis.md':562 'references/repositories.md':595 'references/search.md':461,462,581 'references/syntax.md':549,550,586 'releas':612 'releases.md':610 'remot':7,34,37,81 'remote-analysis.md':561 'repo':21,65,107,111,190,292,295,308,323,338,368,479,483,495,498,508,511 'repo1':271 'repo2':275 'report':429 'repos/owner-a/repo-a/contents/package.json':207 'repos/owner-a/repo-a/contents/path':148,170 'repos/owner-a/repo-a/contents/src/index.ts':224 'repos/owner-b/repo-b/contents/package.json':213 'repos/owner-b/repo-b/contents/path':151,175 'repos/owner-b/repo-b/contents/src/index.ts':230 'repos/owner/repo/contents/path':95 'repos/owner/repo/contents/path/file.ts':85 'repositori':8,38,51,68,125,288,402,596 'repositories.md':594 'resourc':631 'result':421,518 'rust':113,310 'search':27,72,96,100,110,294,307,322,337,356,371,376,380,394,397,399,404,410,415,426,434,440,446,450,458,482,507,510,517,539,583,642 'search.md':580 'see':280,391,460,548 'setup':614 'share':258 'side':57,59 'side-by-sid':56 'similar':128,253 'skill' 'skill-gh-cli' 'solana':135 'solana-fm':134 'sort':114,296,311,328,343,362 'source-tenequm' 'special':463,587 'specif':61,304,334,377,412,557 'specifi':157 'star':115,291,297,312,329,344,374,484 'stargazercount':485,502 'stargazerscount':486,514 'state':444,454 'step':140,162,194,234 'strategi':279 'structur':144 'surfac':245 'syntax':459,464,546,584,588,643 'syntax.md':585 'systemat':121 'templat':86,208,214,225,231 'tenequm/solana-idls':139 'topic':335,339 'topic-agent-skills' 'topic-ai-agents' 'topic-claude-code' 'topic-claude-skills' 'topic-clawhub' 'topic-erc-8004' 'topic-mpp' 'topic-openclaw' 'topic-skills' 'topic-solana' 'topic-x402' 'trend':16,67,106,284,287,302,332,576 'two':119 'typescript':104,361 'uniqu':187,266 'use':18,49,132,471,520,526 'usewallet':359 'variabl':624 'view':480,496,499 'without':22,45,52 'wontfix':431 'workflow':122,552,558,560,601","prices":[{"id":"f1626ed6-726d-4448-8ebd-6e6a2b8160b2","listingId":"6bc98d05-a3ef-435c-9fe0-78c2232560b8","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"tenequm","category":"skills","install_from":"skills.sh"},"createdAt":"2026-04-18T23:05:16.427Z"}],"sources":[{"listingId":"6bc98d05-a3ef-435c-9fe0-78c2232560b8","source":"github","sourceId":"tenequm/skills/gh-cli","sourceUrl":"https://github.com/tenequm/skills/tree/main/skills/gh-cli","isPrimary":false,"firstSeenAt":"2026-04-18T23:05:16.427Z","lastSeenAt":"2026-04-22T01:01:39.649Z"}],"details":{"listingId":"6bc98d05-a3ef-435c-9fe0-78c2232560b8","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"tenequm","slug":"gh-cli","github":{"repo":"tenequm/skills","stars":23,"topics":["agent-skills","ai-agents","claude-code","claude-skills","clawhub","erc-8004","mpp","openclaw","skills","solana","x402"],"license":"mit","html_url":"https://github.com/tenequm/skills","pushed_at":"2026-04-14T16:24:57Z","description":"Agent skills for building, shipping, and growing software products","skill_md_sha":"e2d6557b3ba53a8dc187dfea4610ce4fb0cbbf79","skill_md_path":"skills/gh-cli/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/tenequm/skills/tree/main/skills/gh-cli"},"layout":"multi","source":"github","category":"skills","frontmatter":{"name":"gh-cli","description":"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."},"skills_sh_url":"https://skills.sh/tenequm/skills/gh-cli"},"updatedAt":"2026-04-22T01:01:39.649Z"}}