Choose quick setup for a github.com repository

Based on official documentation (checked 6 Nov 2026), choose quick setup when you have repository admin access, a github.com repository, Claude Code and an installed, authenticated GitHub CLI.

  1. Confirm admin access to the target repository and github.com hosting.
  2. Install the GitHub CLI and authenticate it with gh auth login.
  3. Open claude in the repository, run /install-github-app and follow the prompts.
  4. Complete the credential prompts; Claude Code saves the credential as a repository secret.
  5. Create and merge the setup pull request.

The documentation says @claude works in the repository after you create and merge that pull request. The mention-response check below is your final setup check, not a test we executed.

Quick setup flow ending with a mention-response check
Publisher-created diagram based on Claude Code documentation. Source: Claude Code GitHub Actions – Claude Code Docs, checked 6 Nov 2026

Choose the secret that matches your credential

Use ANTHROPIC_API_KEY for an API key or CLAUDE_CODE_OAUTH_TOKEN for a subscription OAuth token.

Credential:
API key
Repository secret:
ANTHROPIC_API_KEY
Documented scope:
Quick setup saves the API key as a repository secret
Credential:
Subscription OAuth token
Repository secret:
CLAUDE_CODE_OAUTH_TOKEN
Documented scope:
Authenticates a Claude subscription on Pro, Max, Ultra, Team or Enterprise; generate locally with claude setup-token

Note: Never commit API keys or OAuth tokens directly to the repository. Store them as GitHub Secrets and reference those secrets in workflows. The documented API-key reference is anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}.

Accept app permissions; restrict the workflow

Installing the app accepts its full permission set; restricting workflow permissions is a separate responsibility. GitHub doesn’t let you accept only a subset of the app’s permissions.

Boundary:
Permission used by the Action: Contents
Documented access or action:
Read and write for repository-file changes
Boundary:
Permission used by the Action: Issues
Documented access or action:
Read and write for issue responses
Boundary:
Permission used by the Action: Pull requests
Documented access or action:
Read and write for PR creation and pushed changes
Boundary:
App installation
Documented access or action:
Accept the full permission set; review it before installation
Boundary:
Workflow
Documented access or action:
Grant only the permissions it needs
Boundary:
Change review
Documented access or action:
Review Claude’s changes before merging

We treat the permissions used by the Action as distinct from the full installation decision. Subscription authentication doesn’t replace either permission review: its token authenticates your Claude subscription, while the app and workflow have their own access requirements.

Omit prompt; check actor eligibility and the reply

Omit prompt to use interactive mode, then check both the triggering actor’s eligibility and the same-thread response.

Mode:
Interactive
Configuration:
No prompt input
Documented behavior:
Waits for the trigger phrase, @claude by default, in an issue or PR comment, a PR review, or the body or title of a newly opened issue
Mode:
Automation
Configuration:
A prompt input is present
Documented behavior:
Runs without waiting for a mention, remains subject to actor checks and puts results in the workflow run log by default

For issue and pull request events, the triggering user must have repository write access. To allow specific users without write access, configure allowed_non_write_users and supply your own github_token input. On every event, bot actors are rejected unless listed in allowed_bots; write access alone doesn’t establish bot eligibility.

  1. Check that the mention workflow omits prompt.
  2. Choose an actor that meets the write-access rule or configured exception; for a bot, also check allowed_bots.
  3. Tag @claude in an issue or PR comment.
  4. Check for Claude’s comment on that same issue or PR; the documented example updates that comment as work proceeds.

If the expected reply doesn’t appear, we’d check the merged setup pull request, mode selection and actor eligibility before treating the workflow as ready.

Use concurrency controls to limit parallel runs

Use GitHub’s concurrency controls to limit parallel runs of the Claude Code GitHub Action.

Keep that operating control separate from authorization: grant the workflow only the permissions it needs and review Claude’s changes before merging.

Deny credential-file reads to protect history

Use permission rules to deny reads of credential files; GitHub Secret storage addresses a different credential-handling boundary.

Note: Claude Code transcripts and history aren’t encrypted at rest; OS file permissions are their only protection. If a tool reads a .env file or a command prints a credential, that value is written to projects/<project>/<session>.jsonl.