What problem does it solve?
GitHub authentication in agent workflows often defaults to an Enterprise Managed User (EMU) account, causing operations on personal repos or forks to fail. This skill enables safe isolation of multiple GitHub identities to prevent credential leakage and context confusion.
Core Features & Use Cases
- Detect the active identity with gh auth status and identify current account and token scopes.
- Extract a specific account's token with gh auth token --user personaluser or --user corpalias_enterprise to perform actions as that user.
- Push to personal repos from EMU by using a token-authenticated URL for a single operation.
- Create PRs from personal forks to upstream with gh pr create and carefully chosen repo/head parameters.
- Config Directory Isolation using separate GH_CONFIG_DIR environments to isolate credentials per account.
- Shell Aliases for quick switching to personal or EMU accounts (e.g., ghp for personal, ghe for EMU).
Quick Start
Create isolated gh config directories and switch between EMU and personal accounts before running GitHub operations.