What problem does it solve?
Agents and developer shells frequently inherit a single gh (GitHub CLI) authentication context, causing permission failures, accidental credential mixing, and potential token exposure when working across Enterprise Managed User (EMU) and personal accounts. This Skill provides actionable patterns to detect the active identity, perform one-off authenticated operations as a different user, and avoid global auth changes that impact parallel agents.
Core Features & Use Cases
- Detect active identity: Use gh auth status to determine which account is currently authenticated and what token scopes are available.
- One-off token extraction: Extract a specific user's token with gh auth token --user to perform single HTTPS operations without switching the global login.
- Config directory isolation & aliases: Use GH_CONFIG_DIR to maintain separate gh configurations for personal and EMU accounts and add shell aliases for quick context switching.
- Use Cases: Push to a personal fork while the default shell auth is EMU, create PRs from a personal fork to an upstream repo, or clone personal repos without changing enterprise credentials.
Quick Start
Use the gh-auth-isolation skill to check gh auth status, extract a personal token, and push a single commit to your personal repo without changing the global gh login.