What problem does it solve?
Managing multiple GitHub identities (EMU and personal) in automated agent workflows often leads to credential leakage, accidental actions under the wrong account, and failed operations when repositories or PRs require a specific identity. This skill teaches agents how to detect the active identity, switch contexts safely, and isolate credentials to prevent cross-account access.
Core Features & Use Cases
- Detect current identity: Verify the active gh account with gh auth status and interpret outputs to determine which account is in use.
- Safe token extraction: Retrieve a specific account token at runtime using gh auth token --user without persisting credentials.
- Per-task isolation: Run operations under a chosen identity in isolated environments to prevent cross-account actions.
- Practical workflows: Push to personal forks or submit PRs from the correct account, while keeping EMU work credentials intact.
- Security best practices: Avoid leaking credentials by using ephemeral tokens and per-run task configuration.
Quick Start
Switch to the personal GitHub identity before performing actions on personal repositories.