github-auth

Authenticate with GitHub via device code flow, tokens, and GitHub App credentials.

3|1|Updated Dec 3, 2025
One-click install
npx skills add https://github.com/nsheaps/ai-mktpl --skill github-auth-nsheaps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-auth
Source: https://github.com/nsheaps/ai-mktpl/tree/main/shared/skills/github-auth
Command: npx skills add https://github.com/nsheaps/ai-mktpl --skill github-auth-nsheaps

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides Claude and users through appropriate GitHub authentication flows so the agent can access repositories, the GitHub API, and perform cross-repo or automated tasks without permission errors.

Core Features & Use Cases

  • Multiple auth methods: Device code flow, classic and fine-grained personal access tokens, and GitHub App authentication as app or user.
  • Operational guidance: How to generate JWTs, exchange installation tokens, set environment variables, store and rotate credentials securely, and resolve common HTTP errors and SSO requirements.
  • Use case: Authorize an agent to create pull requests across repositories, configure CI/CD secrets, or run long-lived automation with a bot identity.

Quick Start

Authenticate with GitHub using device code flow by running gh auth login with BROWSER=false and follow the browser prompt to authorize access.

Frequently Asked Questions about github-auth

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

FAQPage Schema
How do I authenticate with GitHub using device code flow in a CLI session?

GitHub device code flow authentication is initiated by running the gh auth login command with BROWSER=false, guiding you through a browser prompt to authorize access for your CLI session.

Can I use GitHub App installation tokens for cross-repo automation?

Yes, GitHub App authentication supports generating installation tokens, allowing automated agents or bots to securely perform cross-repo operations and API access using a dedicated identity.

What's the best way to manage and rotate GitHub personal access tokens?

Securely managing GitHub tokens involves properly storing credentials, setting environment variables, and applying rotation practices for both classic and fine-grained personal access tokens to maintain access security.

Why does my GitHub API request fail with SSO or permission errors?

GitHub API requests often fail due to SSO requirements or insufficient token permissions, requiring you to resolve common HTTP errors by ensuring your token has the correct authorization and scopes.

Do I need GitHub App JWTs for CI/CD pipelines?

For CI/CD pipelines and automated agents, GitHub App JWTs and installation tokens provide a secure method to obtain valid credentials for repository access without relying on manual user login.