gh-auth-isolation

Isolate GitHub identities across automated workflows using gh auth status and GH_CONFIG_DIR.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/jperezdelreal/GymBro --skill gh-auth-isolation-jperezdelreal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-auth-isolation
Source: https://github.com/jperezdelreal/GymBro/tree/main/.copilot/skills/gh-auth-isolation
Command: npx skills add https://github.com/jperezdelreal/GymBro --skill gh-auth-isolation-jperezdelreal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safely manage multiple GitHub identities (EMU and personal) used by AI agents to prevent credential leakage and cross-account actions.

Core Features & Use Cases

  • Detect active identity before GitHub operations and validate permissions.
  • Switch context safely between EMU and personal accounts without leaking credentials.
  • Isolate credentials in dedicated environments to support automated workflows with multiple accounts.

Quick Start

Run the identity isolation pattern before any GitHub operation to ensure the correct account is active.

Frequently Asked Questions about gh-auth-isolation

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

FAQPage Schema
How do I manage multiple GitHub accounts in automated workflows to prevent credential leakage?

Manage multiple GitHub accounts by detecting the active identity via gh auth status and switching contexts safely using isolated GH_CONFIG_DIR environments. This prevents credential leakage and cross-account mistakes during automated agent workflows.

How does gh auth token work for isolating GitHub identities per operation?

The gh auth token command extracts per-operation tokens for the active GitHub identity. By pairing this with isolated GH_CONFIG_DIR contexts, agents can switch between EMU corporate and personal accounts safely without persisting credentials.

When do I need to isolate GitHub identities for pushing to forks and opening PRs?

Identity isolation is needed when automated agents operate with mixed-repo resources, such as pushing to forks or opening PRs across EMU corporate accounts and personal GitHub accounts, to prevent cross-account actions and credential leakage.

What is the best way to switch between EMU and personal GitHub accounts without leaking credentials?

The best way to switch GitHub accounts safely is by running an identity isolation pattern before operations, validating permissions with gh auth status, and using dedicated GH_CONFIG_DIR environments to avoid persisting credentials across contexts.

Can I use isolated GH_CONFIG_DIR contexts to safely operate automated agents with mixed-repo resources?

Yes, isolated GH_CONFIG_DIR contexts allow automated agents to safely operate with mixed-repo resources. This approach separates EMU and personal credentials, validating the active identity before any GitHub operation to prevent cross-account mistakes.

Why does my automated agent push to the wrong GitHub account during workflow execution?

Agents push to the wrong GitHub account when credentials are not properly isolated. Running identity detection via gh auth status and using isolated GH_CONFIG_DIR contexts before operations ensures the correct EMU or personal account is active.