GitHub in Claude Code.
Claude Code can work on code and pull requests, but only in the GitHub repos you pick. This is for Claude Code on your own Mac or Linux computer.
passed Nov 16 · GitHub CLI
fieldtrip add ghNew to fieldtrip? Install it first: curl -fsSL fieldtrip.sh/install | sh
Claude Code can
- Read and write code.
- Open and update pull requests.
Can't do
- Change your settings or billing.
- Touch repos you didn't pick.
Try asking Claude Code
Paste one into Claude Code. Underneath: what it runs.
What pull requests are open on my-app?
gh pr list --repo you/my-appShow me what pull request 12 changes.
gh pr diff 12Open a pull request for this branch.
gh pr create --title "…" --body "…"Make a release called v1.0 with this zip.
gh release create v1.0 app.zip
How it’s set up for Claude Code
| the key | In Claude Code's own settings, ~/.claude/settings.json. Only the commands Claude Code runs can see it. Your Terminal can't. |
|---|---|
| the note | Saved as a Claude Code skill, ~/.claude/skills/gh. Claude Code reads it when you ask about GitHub. It says how to use GitHub, and what to check with you about first. |
| after setup | Quit Claude Code fully and reopen it. It reads its settings when it starts. |
| two checks | Unless you've turned it off, Claude Code also asks before it runs a command. fieldtrip's note adds a second check, on top of that one. |
| check it | Ask Claude Code on your computer to run fieldtrip doctor. It should say “Running in Claude Code” and show a ✓ beside GitHub. |
Do this once.
- Make a fine-grained key on GitHub, for only the repos you want your AI to access. fieldtrip will give you the link and tell you which boxes to tick, and why.
- Paste your key when fieldtrip asks you to.
Your key goes into your Terminal when fieldtrip asks. It never goes through Claude Code’s chat.
Checked every night
Yes. GitHub 2.104.0 passed all five checks, Mon, Nov 16 · 11:09 AM CST.
Each square is one night.
Claude Code on the web
When you use Claude Code at claude.ai/code, it runs on a computer in the cloud, not yours. It can use GitHub’s tool there too, but fieldtrip can’t set it up for you yet: you’d store your key as a secret in the cloud environment’s settings and install the tool yourself. We’ve done it by hand with Linear; GitHub hasn’t been tested there yet.
← All of GitHub: every AI, every version · GitHub in Codex → · GitHub in Cursor → · What’s a CLI?