gh-auth-isolation

Extract scoped GitHub tokens for isolated personal and enterprise authentication contexts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill resolves authentication conflicts that occur when AI agents attempt to interact with personal and enterprise GitHub accounts simultaneously, preventing permission errors and accidental credential mixing.

Core Features & Use Cases

  • Identity Detection: Safely verify which GitHub account is currently active before executing commands.
  • Credential Isolation: Extract specific tokens for personal or enterprise accounts without globally switching the default authentication context.
  • Use Case: When an agent needs to push code to a personal repository while the shell is authenticated as an Enterprise Managed User, this skill provides the pattern to use a temporary, scoped token for that specific operation.

Quick Start

Use the gh-auth-isolation skill to extract a personal GitHub token and push your current branch to a personal repository.

Frequently Asked Questions about gh-auth-isolation

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

FAQPage Schema
How do I push to a personal GitHub repository while my CLI is authenticated as an enterprise account?

To push to a personal GitHub repository with an active enterprise account, you need credential isolation to extract a scoped token for that specific operation. This prevents permission errors and accidental credential mixing without globally switching your default authentication context.

Why do I get permission errors when using multiple GitHub identities in the CLI?

Permission errors with multiple GitHub identities occur because authentication contexts conflict when the CLI attempts simultaneous access. Credential isolation resolves this by safely verifying the active account and extracting specific tokens for personal or enterprise accounts without globally switching default authentication.

Do I need the GitHub CLI installed to manage multiple GitHub identities?

Yes, managing multiple GitHub identities through this approach requires the GitHub CLI (gh) to be installed and configured with multiple account profiles. The CLI provides the foundational authentication context needed to extract scoped tokens for specific operations.

What is the best way to isolate GitHub authentication contexts for simultaneous personal and enterprise access?

The best way to isolate GitHub authentication contexts is by extracting scoped tokens for specific operations without globally switching the default authentication context. This approach enables simultaneous access to enterprise and personal GitHub accounts while preventing credential mixing.

Can I verify which GitHub account is active before executing CLI commands?

Yes, you can verify which GitHub account is currently active before executing commands through identity detection. This safely checks the current authentication context, allowing you to confirm whether your personal or enterprise profile is active before running operations.

When should I use scoped tokens instead of switching GitHub accounts globally?

You should use scoped tokens instead of switching GitHub accounts globally when your development workflow requires simultaneous access to enterprise and personal repositories. This prevents permission errors and accidental credential mixing during operations like pushing code across different account types.