gh CLI Integration - Claude Code
Full GitHub CLI support for automated PR and issue workflows.
The GitHub CLI (gh) is the bridge between Claude Code and everything that lives on GitHub - PRs, issues, reviews, releases, workflow runs.
What it does
Claude uses gh through the Bash tool to open PRs, comment on issues, check workflow status, and read review feedback. Because gh outputs structured data with --json, Claude can parse it cleanly and feed the results into further tool calls. It's how automated PR flows work without hand-rolling the GitHub API.
When to use it
- Opening PRs with a title and body Claude drafted from the diff.
- Triaging issues, reading comments, posting responses.
- Checking if CI has finished before asking for a review.
- Reading PR review feedback and auto-fixing.
Gotchas
ghneeds to be installed and authenticated separately. Claude can't log you in.- Rate limits apply the same as with direct API calls.
- Public repo operations (releases, public issues) should require explicit confirmation per repo policy.
Official docs: https://code.claude.com/docs/en/github-actions.md
Technical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools - delivered free every week.
Was this helpful?




