github-multi-account

Detect GitHub accounts and generate gh aliases for personal and work switching.

209|27|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/dotnet/maui-labs --skill github-multi-account-dotnet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-multi-account
Source: https://github.com/dotnet/maui-labs/tree/main/src/Comet/.copilot/skills/github-multi-account
Command: npx skills add https://github.com/dotnet/maui-labs --skill github-multi-account-dotnet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the hassle and errors of working with multiple GitHub accounts that have different authentication contexts, especially when gh operations must consistently target the correct account.

Core Features & Use Cases

  • Account detection and pairing: Detects multiple GitHub accounts via gh auth status and asks you to identify which is personal vs work.
  • Automatic locked-account aliasing: Creates ghp/gh-personal and ghw/gh-work wrappers that automatically switch gh authentication context before running commands.
  • Repo-specific safety guidance: Enforces usage rules (no bare gh repo ops, no manual gh auth switch) and provides guidance for binding this repo’s operations to the personal account.

Quick Start

Tell your AI to set up multi-account GitHub aliases by detecting your accounts with gh auth status, asking you which is personal vs work, and configuring ghp and ghw for automatic switching.

Frequently Asked Questions about github-multi-account

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

FAQPage Schema
How do I switch between multiple GitHub accounts using the gh CLI?

To switch GitHub accounts, this Skill detects your authenticated identities via `gh auth status`, asks you to label them as personal or work, and creates `ghp` and `ghw` command aliases that automatically switch the authentication context before running commands.

Can I create command-line aliases to automatically switch GitHub accounts for personal and work repos?

Yes, you can create command-line aliases to switch GitHub accounts. This Skill generates `gh-personal` and `gh-work` wrappers that execute `gh auth switch --user`, adding them to your PowerShell profile and PATH so your commands always target the correct identity.

What is the best way to manage multiple GitHub accounts for different developer workflows?

The best way to manage multiple GitHub accounts is by pairing detected identities with dedicated aliases. This Skill enforces usage rules to prevent manual switching errors, guiding you to bind specific repository operations to either your personal or employer account.

Do I need to manually run `gh auth switch` before working on different repositories?

No, you do not need to manually run `gh auth switch`. This Skill replaces manual switching with `ghp` and `ghw` wrapper aliases that enforce context safety, preventing bare `gh` repository operations and ensuring commands target the correct authenticated user.

Why do my GitHub CLI commands keep running under the wrong account context?

Your GitHub CLI commands run under the wrong account context because bare `gh` repo ops lack identity binding. This Skill verifies your resulting logins and provides safety guidance to bind repository operations to the correct personal or work account.

Does this multi-account GitHub setup work with PowerShell profiles?

Yes, this multi-account GitHub setup works with PowerShell profiles. The Skill adds the generated `ghp` and `ghw` wrappers directly to your PowerShell profile and PATH, ensuring the authenticated command aliases are available across your developer tooling sessions.