Step 5: Connect GitHub
Due by Friday, 25 September 2026
On the day, the agent opens issues and pull requests on your repository for you. For that it needs to talk to GitHub from the terminal, which the GitHub CLI provides. Two parts: install the GitHub CLI and log in, then create a dev branch.
Part 1: The GitHub CLI
The GitHub CLI comes through Homebrew, the package manager for the Mac. If you do not have Homebrew yet, go to brew.sh, copy the install line shown at the top of that page, paste it into Terminal, press Enter, and follow the prompts. It asks for your Mac password and takes a few minutes. Then, in the same Terminal window, install the GitHub CLI:
brew install ghOpen PowerShell (as in step 4), paste this line, and press Enter:
winget install --id GitHub.cli --source wingetClose the terminal and open a new window afterwards, so the new program is found.
Now connect the CLI to your GitHub account. In the terminal, run:
gh auth loginIt asks a few questions. Answer GitHub.com, HTTPS, Yes to authenticating Git with your GitHub credentials, and Login with a web browser. Copy the one-time code it shows, press Enter, paste the code into the browser page that opens, and authorize.
Check it worked:
gh auth statusThen open a terminal at your setup repository (as in step 4) and run one command that only works when GitHub is reachable:
gh repo viewIt prints the name and README of setup-USERNAME.
The personal access token you created for the first workshop keeps working for RStudio. The GitHub CLI has its own login, which is what you just did. The two do not interfere.
Part 2: A dev branch
The working pattern for the day is that changes land on a branch called dev, get reviewed in a pull request, and reach main through the merge. Create the branch now so it is there when the agent starts working.
Create it on your own repository from step 1, the one with your data, which is where the day’s work happens. Open that project in RStudio with File, Open Project.
In the Git pane, click the New Branch button. Name it dev, leave Sync branch with remote ticked, and click Create. RStudio creates the branch, switches to it, and pushes it to GitHub.
Check on GitHub: the branch menu on your repository page now lists main and dev.
During the workshop we install two small skills written at Global Health Engineering, one that turns the agent’s changes into a commit with a record of what the agent did, and one that opens a pull request from dev into main. They are installed in Claude Code with two commands, take a minute, and can be removed again after the day. Nothing to do now. If you are curious, they live at Global-Health-Engineering/skills.