What problem does it solve? Teams calling the GitHub CLI (gh) from scripts, Makefiles, and CI pipelines hit recurring failures: hung runs from unresolved repo context, leaked tokens from echoed credentials, brittle table-scraping instead of structured output, and over-privileged GITHUB_TOKEN permissions in Actions. This Skill encodes the full gh contract so every invocation is reproducible, least-privilege, and machine-parseable. ## Core Features & Use Cases - Authentication & token precedence: Covers gh auth login flows, the GH_TOKEN > GITHUB_TOKEN > keyring precedence model, GHES enterprise tokens, and fine-grained PAT selection over classic PATs. - Scripting & the gh api escape hatch: Teaches the --json/--jq/--template machine-output trio, -f vs -F field typing, pagination with --paginate/--slurp, and repo-context determinism via -R/GH_REPO. - CI/CD hardening & triage tooling: Encodes the step-level GH_TOKEN + least-privilege permissions: pattern, exit codes 0/1/2/4, extension supply-chain hygiene, and ships three read-only triage scripts (gh-auth-check.sh, gh-config-audit.sh, gh-api-inventory.sh). - Use Case: A GitHub Actions step runs gh release create and hangs in CI. The Skill diagnoses the missing -R flag and interactive prompt, then rewrites the step with GH_TOKEN env, a minimal permissions: block, and --verify-tag. ## Quick Start Ask the AI to review your shell script or workflow step that calls gh and rewrite it to use explicit repo context, --json with --jq output, and least-privilege token handling.