gh-auth-isolation

Detect and enforce the active GitHub identity for agent processes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

GitHub identity fragmentation in automated agent workflows can cause credential mixups, failed operations, and access conflicts when enterprise EMU accounts collide with personal accounts.

Core Features & Use Cases

  • Detect current identity and verify which GitHub account is active before performing operations.
  • Extract and use a specific account's token to run commands as that user without changing the default session.
  • Isolate gh config directories to guarantee complete separation of EMU and personal contexts.
  • Provide quick switching via shell aliases to reduce context-switching burden in multi-account environments.
  • Examples: Agent pushes to a personal fork, creates PRs from a personal branch, and switches identity safely for targeted tasks.

Quick Start

Verify the active gh identity and switch to the personal account for a specific operation using a safe token extraction.

Frequently Asked Questions about gh-auth-isolation

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

FAQPage Schema
How do I prevent GitHub credential mixups in automated workflows?

To prevent GitHub credential mixups in automated workflows, you isolate gh config directories to guarantee complete separation of enterprise EMU and personal account contexts. This strict configuration isolation avoids credential leakage during agent processes.

How do I switch GitHub identities to push to a personal fork?

To switch GitHub identities for pushing to a personal fork, you extract and use a specific account's token to run commands as that user without changing the default session. This ensures operations run safely under the correct personal account context.

Why does my agent workflow fail when enterprise EMU and personal GitHub accounts collide?

Agent workflows fail when enterprise EMU and personal GitHub accounts collide due to GitHub identity fragmentation causing access conflicts and failed operations. Detecting the active identity and verifying the account before performing operations resolves these access conflicts.

Does gh CLI support token management for multiple GitHub accounts?

Yes, gh CLI supports token management for multiple GitHub accounts by extracting and using a specific account's token to run commands without changing the default session. This enables safe identity switching for targeted tasks in multi-account environments.

What is GitHub identity isolation in agent workflows?

GitHub identity isolation in agent workflows is the process of identifying and enforcing the active GitHub account used by agent processes to prevent cross-account operations. It requires strict configuration isolation to avoid credential leakage between contexts.