gh-auth-isolation

Detect and isolate active GitHub identities for automated agents across shells, scripts, and CI.

66|41|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/olivomarco/vbd-copilot --skill gh-auth-isolation-olivomarco
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-auth-isolation
Source: https://github.com/olivomarco/vbd-copilot/tree/main/.copilot/skills/gh-auth-isolation
Command: npx skills add https://github.com/olivomarco/vbd-copilot --skill gh-auth-isolation-olivomarco

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safely manage multiple GitHub identities (EMU and personal) across agent workflows to prevent credential leakage and misattributed actions.

Core Features & Use Cases

  • Detect active identity before GitHub operations using gh auth status.
  • Switch contexts safely by extracting per-account tokens and using dedicated GH_CONFIG_DIR directories.
  • Provide shell aliases and environment-variable helpers to isolate work and personal accounts in shells, scripts, and CI.
  • Use case: run automated tasks as EMU for enterprise repos while keeping personal access for forks separate.

Quick Start

Configure an isolated gh config directory, authenticate with the target account, and run your workflow within that isolated context.

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 isolate multiple GitHub CLI accounts in automated workflows?

Safely isolate multiple GitHub identities by configuring a dedicated GH_CONFIG_DIR directory for each account. This approach extracts per-account tokens and sets environment variables to prevent credential leakage and misattributed actions across automated agent workflows.

How does gh auth status detect the active identity before running GitHub operations?

The gh auth status command detects the active GitHub identity by checking the current authentication state. This identity detection mechanism ensures automated agents operate under the correct EMU work account or personal account before executing any GitHub operations.

Can I switch between EMU work accounts and personal GitHub accounts in CI environments?

Yes, you can switch between EMU work accounts and personal GitHub accounts in CI environments. The Skill provides shell aliases and environment-variable helpers to switch contexts safely without persisting credentials, ensuring safe context switching in shells, scripts, and CI.

What is the best way to prevent unintended cross-account actions with the GitHub CLI?

The best way to prevent unintended cross-account actions with the GitHub CLI is to use per-account configuration directories and guardrails against mixing accounts. This isolates GitHub identities across agents and prevents misattributed actions in your workflows.

Do I need separate token management for GitHub identity isolation in scripts?

Yes, separate token management is required for GitHub identity isolation in scripts. The Skill extracts per-account tokens and uses dedicated configuration directories to ensure safe context switching without persisting credentials across your automated workflows.