gh-auth-isolation

Detect active GitHub identity and isolate credentials in gh config contexts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enterprise-level automation often runs with a single default GitHub auth, which breaks when agents need to operate as a personal account or a different corporate identity. This skill teaches how to detect the active identity, switch contexts safely, and isolate credentials so actions stay within the intended account.

Core Features & Use Cases

  • Detect and report the currently active GitHub identity before any operation.
  • Safely switch context to a target account (EMU or personal) using isolated gh config directories and runtime token extraction.
  • Provide best practices for avoiding token leakage, including non-persistent token usage and explicit remote URL handling.
  • Real-world use case: agents push to a personal fork while the default context is an enterprise account, or run privileged actions in a controlled, auditable way.

Quick Start

Run a check to identify the active identity, then switch context using isolated configuration and on-demand token retrieval for the target account.

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 GitHub identities in automated workflows without leaking credentials?

To switch GitHub identities safely, use isolated gh config directories and on-demand token extraction to separate contexts. This prevents credential leakage by ensuring non-persistent token usage and explicit remote URL handling during automated agent-driven tasks.

Why does my agent push commits to the wrong GitHub account?

Your agent pushes commits to the wrong GitHub account because it defaults to a single enterprise auth context. You must detect the active identity and switch contexts safely to target the correct EMU or personal account before pushing.

Can I push to a personal fork while my default GitHub context is an enterprise account?

Yes, you can push to a personal fork from an enterprise context by switching to an isolated GitHub config context for the target account. This isolates credentials so your actions stay within the intended personal account.

What is the best way to detect the currently active GitHub identity before running an operation?

The best way to detect the active GitHub identity is to run a pre-operation check that reports the current authenticated user. This verifies the context before executing operations like creating PRs or forking repos across EMU and personal accounts.

Do I need isolated configuration directories to manage multiple GitHub tokens?

Yes, you need isolated configuration directories to manage multiple GitHub tokens safely. They prevent token leakage by separating EMU and personal account credentials into distinct contexts during automated workflow execution.