gh-auth
CommunityAuto-login gh CLI from a token file.
Authoraustinpray
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill automatically authenticates the GitHub CLI using a token from the repository root (.gh-token.txt) when you encounter common login errors such as "gh auth login", "GH_TOKEN environment variable", or "not logged into any GitHub hosts". It streamlines command execution by ensuring you are authenticated before proceeding with GitHub operations.
Core Features & Use Cases
- Auto-authentication: Detects authentication errors and logs in to gh using the token from .gh-token.txt.
- Status Verification: Verifies success with
gh auth statusto confirm login. - Seamless Retries: Automatically retries the original task after successful authentication.
- Security Best Practices: Reads the token from stdin and keeps the token file in
.gitignoreto protect credentials.
Quick Start
- Trigger an authentication check or run a GitHub CLI command that requires login. REPO_ROOT=$(git rev-parse --show-toplevel) && gh auth login --with-token < "$REPO_ROOT/.gh-token.txt"
- Verify success: gh auth status
- Retry the original command if needed.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: gh-auth Download link: https://github.com/austinpray/feed-baby/archive/main.zip#gh-auth Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.