Claude Code GitHub Actions: @claude in issues and PRs
Added Updated Copyable prompt below
Published Last verified Released
Our verdict
A low-friction way to put Claude inside your GitHub flow: mention @claude on an issue or PR and it answers, reviews or pushes a branch for you to review. It runs on your own GitHub runner, so each run costs Actions minutes plus Claude API tokens (or usage on your Claude subscription with an OAuth token). Good for small fixes, review follow-ups and scheduled chores. Keep permissions tight, cap the turns, and treat its branches like any contributor's.
- Who it's for
- Small teams and solo maintainers on GitHub
- Leverage
- Issue comments become pull requests
- Effort
- Medium
- Date added
What Claude Code GitHub Actions do
The Claude Code GitHub Action (anthropics/claude-code-action@v1, MIT) runs Claude Code in a GitHub Actions workflow. In interactive mode, used when the workflow has no prompt, it waits for @claude in an issue or PR comment, a PR review, or a new issue's title or body, and replies in one comment that it updates as it works. In automation mode, used when you pass a prompt or a skill, it runs on any event you choose, including a cron schedule. On an issue it commits to a new branch and links to a prefilled pull request; on an open PR it pushes to that PR's branch. It follows your CLAUDE.md, can read CI results with actions: read, and authenticates with an API key, a Claude subscription token, workload identity federation, Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry.
How builders use Claude Code GitHub Actions
- Run /install-github-app inside Claude Code: it installs the Claude GitHub App, saves the secret and opens a PR with the workflow files. You need admin rights on the repo.
- Comment @claude with a specific request on an issue (for example: fix the TypeError in the user dashboard component), then review the branch and open the PR from the link it posts.
- Ask @claude on an open PR to address review comments; it pushes to that PR's branch.
- Review every PR with the code-review plugin and the prompt /code-review:code-review --comment, so findings land as inline comments.
- Schedule a daily report or triage job with a cron trigger and a prompt, granting only the GitHub tools it needs with --allowedTools.
- Cap cost with --max-turns in claude_args, workflow timeouts and GitHub's concurrency controls.
Interactive or automation mode
The action picks the mode from your workflow file (Anthropic's docs, checked 25 Nov 2026).
| Mode | When it runs | Where the result goes |
|---|---|---|
| Interactive (no prompt input) | @claude in an issue or PR comment, a PR review, or a new issue's title or body | One comment on that issue or PR, updated as it works |
| Automation (prompt input) | Any GitHub event you configure, such as pull_request or a schedule | The workflow run log, unless the prompt tells it to post and it has a tool that can |
What each run costs
- GitHub Actions minutes on the runner, at GitHub's normal rates.
- Claude API tokens, which grow with prompt and response length, task complexity and codebase size.
- Or usage on your Claude subscription (Pro, Max, Ultra, Team or Enterprise) if you authenticate with a CLAUDE_CODE_OAUTH_TOKEN made with claude setup-token.
- For a secret shared across an organisation, Anthropic recommends an API key, because an OAuth token is tied to one person's subscription.
Claude Code GitHub Actions: limits and gotchas
- The Claude GitHub App asks for more than this action uses (read and write on Actions, Workflows, Repository hooks and Discussions, among others) because Code Review and auto-fix share it. GitHub won't let you accept a subset; if that's a problem, create a custom app with only Contents, Issues and Pull requests.
- Only users with write access can trigger it, and bot accounts are rejected unless you list them in allowed_bots.
- Pull requests from forks are skipped by default (allow_fork_prs used to default to true). If you turn it on, Claude pushes to a pr-N branch in your repo that contains the fork's code, so keep pr-* branches out of CI that holds secrets.
- It can't approve PRs or submit formal reviews, and it's instructed not to merge or rebase.
- Issue and comment text from outside contributors still reaches Claude, so prompt injection is possible. Keep workflow permissions minimal.
- Commits pushed with the default GITHUB_TOKEN don't trigger your CI. Let the action authenticate as the Claude app, or pass a custom app token.
Claude Code GitHub Actions compared with other tools here
- Copilot coding agent: assign an issue to Copilot and review the PR it opens. Pick it if your team already pays for Copilot and doesn't want workflow files to maintain.
- Codex cloud: OpenAI's cloud agent: send coding tasks, review the results and open PRs, without running anything on your own Actions runner.
- Cursor Bugbot: a hosted reviewer that comments on every PR. Pick it if you only want review, with no workflow to maintain.
- CodeRabbit: independent A.I. code review, PR triage and change explanations. Pick it when review is the main job.
- Jules: Google's async agent: pick a repo, approve its plan, get a PR, all set up from Jules rather than a workflow file in your repo.
When to pick Claude Code GitHub Actions
- Pick Claude Code GitHub Actions if you already use Claude Code and want @claude in issues and PRs, running on your own runner and following your CLAUDE.md.
- Pick it for scheduled or event-driven chores (triage, docs sync, daily reports) where a workflow file gives you control over triggers and tools.
- Pick Copilot's coding agent or Codex cloud if you'd rather not maintain workflow files and secrets.
Copy this: Issue comment
@claude Implement the change described in this issue.
- Follow the conventions in CLAUDE.md.
- Add or update tests that cover the new behaviour.
- Keep the diff minimal; don't refactor unrelated code.
- Open a PR that links this issue and explains what you changed and why.Claude Code GitHub Actions questions
Can I use my Claude subscription instead of an API key?
Yes. Run claude setup-token locally and save the result as the CLAUDE_CODE_OAUTH_TOKEN secret. Pro, Max, Ultra, Team and Enterprise plans work, and runs then use your subscription instead of API billing.
Why doesn't Claude respond to @claude?
Check that the Claude GitHub App is installed on the repo, workflows are enabled, the secret is set, the comment contains @claude as a whole word, and the person commenting has write access.
Why doesn't my CI run on Claude's commits?
GitHub doesn't trigger workflows on commits made with the default GITHUB_TOKEN. Remove github_token so the action authenticates as the Claude GitHub App, or pass a custom app token.
Does it work with GitLab?
No. /install-github-app only works with github.com repositories. Anthropic documents a separate Claude Code GitLab CI/CD integration.
Related discoveries
See the newest picks →- WorkflowCoding & Shipping Agents
Turn a GitHub issue into a PR with Copilot cloud agent
Assign an issue to Copilot and review the pull request it opens.
Effort: LowPrompt
- ToolCoding & Shipping Agents
Jules by Google
An async coding agent: pick a repo, describe the task, approve the plan, get a PR.
Effort: Low
Get the best new A.I. picks in your inbox
The best new agent workflows and tools we’ve vetted, with a clear verdict on each. Short, occasional, useful.