gh-auth-isolation

Detect and switch between GitHub identities using gh auth status and GH_CONFIG_DIR.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/WayneWalterBerry/MMO --skill gh-auth-isolation-waynewalterberry
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gh-auth-isolation
Source: https://github.com/WayneWalterBerry/MMO/tree/main/.copilot/skills/gh-auth-isolation
Command: npx skills add https://github.com/WayneWalterBerry/MMO --skill gh-auth-isolation-waynewalterberry

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detecting and isolating GitHub identities within automated agent workflows to prevent cross-account actions and credential mix-ups.

Core Features & Use Cases

  • Detects the active gh identity and confirms the current account in use.
  • Extracts tokens for a specific account and uses them for targeted operations without global credential changes.
  • Enables per-identity isolation (via config directories) and quick-switch aliases to safely push to personal repos or manage forks.
  • Supports both EMU (enterprise) and personal accounts in a single, controlled workflow.

Quick Start

Configure isolated gh configurations for each identity and verify the active account before performing operations.

Frequently Asked Questions about gh-auth-isolation

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

FAQPage Schema
How do I safely switch between multiple GitHub identities in automated agent workflows?▼

To safely switch GitHub identities in automated agent workflows, you can detect the active account using gh auth status and isolate configurations with GH_CONFIG_DIR and shell aliases to prevent credential mix-ups.

What's the best way to prevent credential leakage when pushing to personal repos from an enterprise session?▼

Preventing credential leakage when pushing to personal repos from an enterprise session involves using per-account config isolation via GH_CONFIG_DIR and extracting specific tokens with gh auth token --user.

Can I use gh auth token to extract credentials for a specific account without changing my global config?▼

Yes, you can extract tokens for a specific account using gh auth token --user to perform targeted operations without applying global credential changes to your environment.

How does identity detection work for enterprise and personal accounts in CI pipelines?▼

Identity detection for enterprise and personal accounts in CI pipelines works by executing gh auth status to confirm the current account and applying per-identity isolation to ensure correct usage.

Why does my agent workflow push code to the wrong GitHub account?▼

Automated workflows push code to the wrong GitHub account when multiple identities are not properly isolated, requiring per-account config directories and quick-switch aliases to guarantee correct credential usage.