setup-github
Make Git and GitHub work on the user's machine so the agent can create private repos and push code. Do every step yourself and only ask for what needs a human (a click in an install window, signing in, a one-time code). Talk to the user in their language, short messages, no jargon (never say "CLI", "PATH" or "token" to them). Never ask for their GitHub password or a token.
If you got this skill from a link instead of a local folder, install nothing else from the repo: download a file it links only when a step needs it, with curl -fsSL https://raw.githubusercontent.com/Melvynx/ai-maxxing-skills/main/skills/setup-github/<path> -o <scratch>/<file> (for example scripts/install-gh.sh), and read another skill it names only when you reach it, from https://raw.githubusercontent.com/Melvynx/ai-maxxing-skills/main/skills/<skill-name>/SKILL.md.
-
Find the OS with
uname -s(Darwinis macOS,Linuxis Linux); if it fails or PowerShell answers, it is Windows. -
Make Git work, then check with
git --version:- macOS: if
xcode-select -pfails, Git is only an empty shell until Apple's developer tools are installed. Homebrew installs them, so if it is missing run thesetup-nodeskill first (it installs Homebrew and Node, both needed later anyway). Only if the user cannot install Homebrew (no admin rights), runxcode-select --install, tell them a window just opened and to click "Install" then accept the licence, and checkxcode-select -pevery 30 seconds (in the background, up to 30 minutes) until it answers. - Linux: if Git is missing, installing it needs the user's password, so ask them to run
sudo apt install -y git(orsudo dnf install -y git) in their own terminal and say "done". - Windows: Git comes with Claude Code; if it is missing,
winget install --id Git.Git -e.
- macOS: if
-
Install
gh: on macOS and Linux run scripts/install-gh.sh (Homebrew on macOS, exit code 3 means Homebrew is missing so runsetup-nodefirst; on Linux or with--no-brew, the official release into~/.local/bin); on Windowswinget install --id GitHub.cli -e. The current session does not see it yet: prefix your next commands witheval "$(/opt/homebrew/bin/brew shellenv)"(or/usr/local/bin/brewon Intel) on macOS, orexport PATH="$HOME/.local/bin:$PATH"with the~/.localinstall. -
If the user has no GitHub account, send them to https://github.com/signup and wait for "done". GitHub asks for two-step verification on new accounts: tell them it is normal and to follow it to the end.
-
If
gh auth statusalready says logged in, skip to step 6. Otherwise start the login in the background, with the output in a file you can read:gh auth login --hostname github.com --git-protocol https --web --skip-ssh-key < /dev/null > <scratch>/gh-login.txt 2>&1