github-multi-account

Configure gh personal and work aliases via PowerShell wrappers.

2|Updated Apr 21, 2026
One-click install
npx skills add https://github.com/elbruno/md-to-slides --skill github-multi-account-elbruno
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-multi-account
Source: https://github.com/elbruno/md-to-slides/tree/main/.copilot/skills/github-multi-account
Command: npx skills add https://github.com/elbruno/md-to-slides --skill github-multi-account-elbruno

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The skill prevents mistakes and friction when working across multiple GitHub accounts by replacing manual account switching with clear, account-specific aliases.

Core Features & Use Cases

  • Auto-detect multi-account setup: Runs gh auth status, identifies multiple logged-in accounts, and uses the discovered usernames to drive configuration.
  • Guided account selection: Asks you to confirm which username is personal vs work/EMU before making changes.
  • One-time automated shell environment setup: Creates PowerShell profile functions and cmd wrappers, updates PATH so the aliases are available immediately, and provides verification commands.
  • Usage rules and repo binding: Enforces a rule to never use bare gh for repo operations in the configured environment and specifies that the bradygaster/squad repo must use the personal alias.

Quick Start

Tell the AI to set up your GitHub multi-account aliases by running account detection with gh auth status and configuring ghp/ghw so your personal and work repos use the correct account automatically.

Frequently Asked Questions about github-multi-account

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

FAQPage Schema
How do I manage multiple GitHub accounts with the gh CLI?

You can manage multiple GitHub accounts by creating deterministic personal and work aliases for the gh CLI. This prevents friction and mistakes by replacing manual account switching with clear, account-specific shell wrappers.

How do I set up PowerShell aliases for personal and work GitHub accounts?

Setting up PowerShell aliases involves auto-detecting logged-in accounts via gh auth status, confirming which username is personal or work, and generating shell profile functions to enable immediate use of ghp and ghw commands.

Can I automatically detect multiple GitHub CLI logins and configure aliases?

Yes, the configuration process runs gh auth status to identify multiple logged-in accounts, prompts you to map usernames as personal or work, and automatically generates the corresponding shell wrappers for safe repo operations.

What is the best way to prevent Git push errors across personal and work GitHub identities?

The best way to prevent cross-account push errors is to enforce a rule to never use bare gh for repo operations, relying instead on generated account-specific aliases like ghp for personal repositories and ghw for work.

Does setting up GitHub CLI multi-account aliases require manual PATH configuration?

No, the automated shell environment setup creates PowerShell profile functions and cmd wrappers, automatically updates your PATH so the aliases are available immediately, and provides verification commands using gh api user.

Why should I avoid using bare gh commands when managing multiple GitHub accounts?

You should avoid bare gh commands to prevent accidental pushes or API calls under the wrong identity. The setup specifies using account-specific aliases to ensure repo operations bind to the correct authenticated user.