gh-auth-isolation

Detect active GitHub identity and isolate gh config contexts per account.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/CarlosSardo/nats-poc-simulator --skill gh-auth-isolation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-auth-isolation
Source: https://github.com/CarlosSardo/nats-poc-simulator/tree/main/.copilot/skills/gh-auth-isolation
Command: npx skills add https://github.com/CarlosSardo/nats-poc-simulator --skill gh-auth-isolation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automate and safely manage multiple GitHub identities in agent workflows without accidentally performing actions as the wrong account.

Core Features & Use Cases

  • Detect the active gh identity and verify access before operations.
  • Isolate credentials per account using token extraction methods and per-account config directories.
  • Enable push and PR workflows across EMU and personal accounts without cross-account contamination.

Quick Start

Switch the authentication context to the desired GitHub identity before executing any gh command.

Frequently Asked Questions about gh-auth-isolation

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

FAQPage Schema
How do I switch between EMU and personal GitHub identities to prevent credential leakage?

To switch GitHub identities, isolate credentials per account using token extraction methods and per-account config directories. This prevents cross-account contamination and ensures operations run under the correct identity without side effects.

How do I isolate gh config contexts for multi-account GitHub authentication?

Isolating gh config contexts involves setting up per-account config directories to separate credentials. This guarantees correct authentication and prevents cross-account actions when pushing to personal forks or creating PRs from personal branches.

How does detecting the active GitHub identity work in automated workflows?

Detecting the active GitHub identity works by verifying access and extracting per-account tokens before executing operations. This mechanism ensures that automated agent workflows perform actions under the correct account and avoid accidental cross-account operations.

When do I need to isolate GitHub authentication for multi-account teams?

You need to isolate GitHub authentication when performing operations that must run under a specific account within multi-account teams, such as pushing to personal forks, creating PRs from personal branches, or switching between EMU and personal accounts.

Can I push to personal forks and create PRs without cross-account contamination?

Yes, you can push to personal forks and create PRs without cross-account contamination by switching the authentication context to the desired GitHub identity before executing any gh command. This isolates credentials and prevents cross-account side effects.

What are the limitations of using per-account gh config directories for identity isolation?

Per-account gh config directories require proper token extraction and context switching before each operation. Without correctly isolating gh config contexts, automated workflows risk credential leakage and performing actions as the wrong account.