gh-auth-isolation

Detect active GitHub identity and isolate credentials for per-operation account switching.

Updated Nov 27, 2024
One-click install
npx skills add https://github.com/Izak90/Izak90.github.io --skill gh-auth-isolation-izak90
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-auth-isolation
Source: https://github.com/Izak90/Izak90.github.io/tree/main/isaac_treinos_ar_livre/.copilot/skills/gh-auth-isolation
Command: npx skills add https://github.com/Izak90/Izak90.github.io --skill gh-auth-isolation-izak90

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Modern development environments frequently run AI agents that default to an Enterprise Managed User (EMU) GitHub identity, which can block actions that require a personal account (e.g., pushing to personal repos or creating PRs). This Skill teaches agents how to detect the active identity, switch contexts safely, and isolate credentials to avoid cross-account actions.

Core Features & Use Cases

  • Detect the current gh identity and its token scopes before performing critical operations.
  • Temporarily extract a token for a specific account and perform a single operation without persisting credentials.
  • Use isolated gh config directories or per-command credentials to keep EMU and personal accounts separate.

Quick Start

Verify the active gh identity and switch to the personal account for the next GitHub operation.

Frequently Asked Questions about gh-auth-isolation

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

FAQPage Schema
How do I stop my AI agent from using my Enterprise Managed User GitHub identity for personal repo pushes?

To prevent Enterprise Managed User identity usage for personal pushes, apply GitHub identity isolation to detect the active account and switch contexts safely. This enforces per-operation config separation to avoid cross-account credential actions in agent workflows.

How does credential isolation work when switching GitHub accounts in automation workflows?

Credential isolation works by using isolated gh config directories or per-command credentials to separate EMU and personal accounts. It temporarily extracts a token for a specific operation without persisting credentials, ensuring secure identity switching.

When do I need to switch GitHub contexts for AI agent operations?

You need to switch GitHub contexts when an agent defaults to an EMU identity but must perform actions requiring a personal account, such as pushing to personal repos or creating PRs and forks across enterprise and personal projects.

Can I perform a single GitHub push as a personal account without persisting my credentials?

Yes, you can perform a single GitHub push without persisting credentials by temporarily extracting a token for a specific account. This ephemeral credential usage ensures the token is used for one operation and not saved to the environment.

What is the best way to manage multiple GitHub identities securely in automated pipelines?

The best way to manage multiple GitHub identities securely is using per-operation config separation to isolate tokens. This approach satisfies requirements for identity detection, token isolation, and ephemeral credential usage to ensure auditable operations.

Does gh-auth-isolation work without any external dependencies for identity detection?

Yes, gh-auth-isolation works without external dependencies to detect the current gh identity and its token scopes. It performs context switching and isolated config directory management natively within your agent workflows.