github-multi-account

Solid

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.

AI & Automation 58 stars 15 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
59
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# GitHub Multi-Account — AI-Driven Setup ## When to Activate When the user has multiple GitHub accounts (check with `gh auth status`). If you see 2+ accounts listed, this skill applies. ## What to Do (as the AI agent) ### Step 1: Detect accounts Run: `gh auth status` Look for multiple accounts. Note which usernames are listed. ### Step 2: Ask the user Ask: "I see you have multiple GitHub accounts: {list them}. Which one is your personal account and which is your work/EMU account?" ### Step 3: Run the setup automatically Once the user confirms, do ALL of this for them: ```powershell # 1. Define the functions $personal = "THEIR_PERSONAL_USERNAME" $work = "THEIR_WORK_USERNAME" # 2. Add to PowerShell profile $profilePath = $PROFILE.CurrentUserAllHosts if (!(Test-Path $profilePath)) { New-Item -Path $profilePath -Force | Out-Null } $existing = Get-Content $profilePath -Raw -ErrorAction SilentlyContinue if ($existing -notmatch "gh-personal") { $block = @" # === GitHub Multi-Account Aliases === function gh-personal { gh auth switch --user $personal 2>`$null | Out-Null; gh @args } function gh-work { gh auth switch --user $work 2>`$null | Out-Null; gh @args } Set-Alias ghp gh-personal Set-Alias ghw gh-work "@ Add-Content -Path $profilePath -Value $block } # 3. Create CMD wrappers $binDir = Join-Path $env:USERPROFILE ".squad\bin" if (!(Test-Path $binDir)) { New-Item -ItemType Directory -Path $binDir -Force | Out-Null } "@echo off`ngh auth switch --user $personal >nul 2...

Details

Author
DanWahlin
Repository
DanWahlin/ai-agent-board
Created
6 months ago
Last Updated
2 weeks ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category