gh-cli

Authenticate gh CLI as a GitHub App installation using a temporary access token.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/radiusred/skills --skill gh-cli-radiusred
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-cli
Source: https://github.com/radiusred/skills/tree/main/gh-cli
Command: npx skills add https://github.com/radiusred/skills --skill gh-cli-radiusred

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires PyJWT, requests, and includes scripts (resource) components.

What problem does it solve?

Agents need to perform GitHub operations securely without interactive login, using the gh CLI authenticated as the GitHub App installation.

Core Features & Use Cases

  • Authenticate gh using a temporary Installation Access Token (IAT) derived from the GitHub App's private key.
  • Execute standard gh commands for repositories, pull requests, and issues under the App's permissions.
  • Refresh tokens for long-running tasks and rotate credentials as needed.

Quick Start

Generate an Installation Access Token and export it as GH_TOKEN to begin issuing gh commands.

Frequently Asked Questions about gh-cli

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

FAQPage Schema
How do I authenticate the GitHub CLI as a GitHub App installation?

To authenticate the GitHub CLI as a GitHub App installation, you generate a temporary Installation Access Token (IAT) using the App's private key and export it as the GH_TOKEN environment variable to execute commands.

What credentials do I need to automate GitHub CLI operations without user interaction?

Automating GitHub CLI operations without user interaction requires your GitHub App credentials: GITHUB_CLIENT_ID, GITHUB_PRIVATE_KEY, and GITHUB_INSTALLATION_ID to generate the installation token.

How does the installation token work for long-running gh CLI tasks?

For long-running gh CLI tasks, the installation token works by allowing you to refresh GH_TOKEN and rotate credentials as needed before expiration, ensuring continuous secure access to repositories and issues.

Can I manage pull requests and issues using gh CLI authenticated as a GitHub App?

Yes, you can manage pull requests and issues using gh CLI authenticated as a GitHub App, executing standard repository management commands under the App's specific permissions.

Why use an installation token instead of a personal access token for GitHub automation?

Using an installation token for GitHub automation provides secure, non-interactive access scoped to the App's permissions, avoiding the need to manage personal access tokens while enabling automated repository operations.