Gh Auth Isolation
Safely manage multiple GitHub identities (EMU + personal) in agent workflows
Install
npx skills add Azure-Samples/agent-skills-dotnet-demo --skill gh-auth-isolationgit clone --depth 1 https://github.com/Azure-Samples/agent-skills-dotnet-demo.git /tmp/agent-skills-dotnet-demo
mkdir -p ~/.claude/skills
cp -r /tmp/agent-skills-dotnet-demo/.squad/templates/skills/gh-auth-isolation ~/.claude/skills/gh-auth-isolationPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
## Context Many developers use GitHub through an Enterprise Managed User (EMU) account at work while maintaining a personal GitHub account for open-source contributions. AI agents spawned by Squad inherit the shell's default `gh` authentication — which is usually the EMU account. This causes failures when agents try to push to personal repos, create PRs on forks, or interact with resources outside the enterprise org. This skill teaches agents how to detect the active identity, switch contexts safely, and avoid mixing credentials across operations. ## Patterns ### Detect Current Identity Before any GitHub operation, check which account is active: ```bash gh auth status ``` Look for: - `Logged in to github.com as USERNAME` — the active account - `Token scopes: ...` — what permissions are available - Multiple accounts will show separate entries ### Extract a Specific Account's Token When you need to operate as a specific user (not the default): ```bash # Get the personal account token (by username) gh auth token --user personaluser # Get the EMU account token gh auth token --user corpalias_enterprise ``` **Use case:** Push to a personal fork while the default `gh` auth is the EMU account. ### Push to Personal Repos from EMU Shell The most common scenario: your shell defaults to the EMU account, but you need to push to a personal GitHub repo.
Details
- Skill name
gh-auth-isolation- Repository
- Azure-Samples/agent-skills-dotnet-demo
- Path
.squad/templates/skills/gh-auth-isolation/SKILL.md- License
- MIT
- Repo updated
- 10 April 2026
FAQ
What does the Gh Auth Isolation skill do?
Safely manage multiple GitHub identities (EMU + personal) in agent workflows
How do I install the Gh Auth Isolation skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add Azure-Samples/agent-skills-dotnet-demo --skill gh-auth-isolation. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Gh Auth Isolation popular?
It lives in Azure-Samples/agent-skills-dotnet-demo, which has 45 GitHub stars and 11 forks.
Related skills
Agent Collaboration
45Azure-Samples/agent-skills-dotnet-demo
Standard collaboration patterns for all squad agents — worktree awareness, decisions, cross-agent communication
Agent Conduct
45Azure-Samples/agent-skills-dotnet-demo
Shared hard rules enforced across all squad agents
Architectural Proposals
45Azure-Samples/agent-skills-dotnet-demo
How to write comprehensive architectural proposals that drive alignment before code is written
Git Workflow
45Azure-Samples/agent-skills-dotnet-demo
Squad branching model: dev-first workflow with insiders preview channel
Distributed Mesh
45Azure-Samples/agent-skills-dotnet-demo
How to coordinate with squads on different machines using git as transport
Github Multi Account
45Azure-Samples/agent-skills-dotnet-demo
Detect and set up account-locked gh aliases for multi-account GitHub. The AI reads this skill, detects accounts, asks the user which is personal/work, and runs the setup automatically.
Browse the most popular Claude skills, all git & code review skills, or write your own with the skills generator.