gh-cli

Authenticate GitHub CLI workflows for accessing GitHub data and repositories.

1|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/cavit99/codex-skill-library --skill gh-cli-cavit99
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-cli
Source: https://github.com/cavit99/codex-skill-library/tree/main/gh-cli
Command: npx skills add https://github.com/cavit99/codex-skill-library --skill gh-cli-cavit99

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gh, rg, git, and includes scripts (resource) components.

What problem does it solve?

Ensures Codex uses the GitHub CLI (gh) for authenticated access to GitHub data, avoiding unauthenticated requests and potential rate limits.

Core Features & Use Cases

  • Prefer gh for reading repos, files, trees, pull requests, issues, releases, and GitHub API endpoints to ensure authentication and consistent results.
  • Fall back to ordinary web access only when gh is unavailable or unauthenticated, with clear guardrails and guidance for switching to gh.
  • Include helper scripts to audit authentication status and map GitHub URLs to gh commands for deterministic and repeatable workflows.

Quick Start

Install and enable the gh-cli skill, then default to using gh for all GitHub data access tasks.

Frequently Asked Questions about gh-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I access private GitHub repositories without hitting API rate limits?

Using the gh CLI for authenticated GitHub workflows prevents unauthenticated rate limits when accessing private repositories, API endpoints, and raw content. It maps GitHub URLs to gh commands for deterministic, authenticated access to commits, issues, and pull requests.

Why does my unauthenticated curl request to api.github.com fail to fetch repository content?

Unauthenticated curl requests to api.github.com fail due to strict GitHub rate limits. Using the gh CLI authenticates requests automatically, providing consistent access to repository trees, releases, and Actions data without hitting unauthenticated traffic thresholds.

What is the best way to read files from a private GitHub repository programmatically?

Using the gh CLI with shallow clones for file access is the best way to read files from private repositories programmatically. This authenticated method replaces raw.githubusercontent.com URLs, ensuring deterministic access to repository content while maintaining GitHub authentication.

Do I need to install and authenticate gh before using GitHub CLI workflows?

You need to install and authenticate the gh CLI before using GitHub CLI workflows. The skill requires gh to be installed and authenticated to access GitHub data, falling back to ordinary web access only when gh is unavailable with clear guardrails.

Can I use gh CLI to fetch pull requests, issues, and releases instead of raw GitHub URLs?

You can use gh CLI to fetch pull requests, issues, and releases instead of raw GitHub URLs. Helper scripts map GitHub URLs to gh commands, ensuring authenticated and deterministic workflows for accessing repository data, commits, and GitHub Actions.

When should I fall back to ordinary web access instead of using gh for GitHub data?

You should fall back to ordinary web access only when gh is unavailable or unauthenticated. The skill provides clear guardrails and guidance for switching back to gh, ensuring authenticated GitHub workflows remain the default for accessing repos, files, and API endpoints.