Skip to contentমূল লেখায় যান

Part 16পর্ব 16 · Automate

GitHub Actions

The Claude Code GitHub Action brings Claude into your pull requests and issues. This page shows how to set it up, how a tester asks @claude for missing tests, how to review the tests in every PR automatically, how to triage a flaky test with structured output, and how to keep cost and risk under control.

12 min read12 মিনিটে পড়া যায় · 9 sections9টি সেকশন · 4 sources4টি সোর্স · updated Nov 2026আপডেট: Nov 2026

@claude in a pull requestpull request-এ @claude

See a comment trigger a runner, then switch to a prompt and see the result move from a PR comment to the run log.একটা কমেন্ট কীভাবে রানার চালায় দেখুন, তারপর prompt-এ বদলান আর দেখুন ফলাফল PR কমেন্ট থেকে রান লগে যায়।

2 min2 মিনিট7 steps7টি ধাপ
  • Modeমোডinteractive
  • Triggerট্রিগার@claude
  • ResultফলাফলPR comment
testerটেস্টারGitHubGitHubpull requestপুল রিকোয়েস্টClaude GitHub AppClaude GitHub অ্যাপRunnerরানারClaudeClaudeSecretsসিক্রেটANTHROPIC_API_KEYANTHROPIC_API_KEYRun logরান লগ

You’ll learnআপনি শিখবেন

  • How the Action picks a modeAction কীভাবে মোড বেছে নেয়
  • Why automation needs no mentionAutomation-এ কেন মেনশন লাগে না
  • Where the result goes in each modeপ্রতিটা মোডে ফলাফল কোথায় যায়
  • How --max-turns limits cost--max-turns কীভাবে খরচ কমায়

What the Action does

Claude Code GitHub Actions is a GitHub Action, anthropics/claude-code-action, that runs Claude Code inside your repository's workflows. Source 1সোর্স 1

Several products share the Claude Code name. Code Review gives automatic review on every pull request without a workflow file. This page covers the workflow integration only. Source 1সোর্স 1

Two modes

The Action detects the mode from your workflow: Source 1সোর্স 1

ModeWhenWhere the result goes
InteractiveThe workflow has no prompt input. Claude waits for the trigger phrase, @claude by default, in a comment, a review, or a new issue.A comment on the issue or PR Source 1সোর্স 1
AutomationThe workflow has a prompt input. Claude runs without a mention.The workflow run log, by default Source 1সোর্স 1

The Headless & CI page covers claude -p, which you can run in any CI system without this Action.

সহজ English

The Claude Code GitHub Action is named anthropics/claude-code-action. It runs Claude Code inside the workflows of your repository. Source 1সোর্স 1 Write @claude in a comment on a pull request or an issue. Claude then analyzes the code, makes changes, and pushes commits. Source 1সোর্স 1 You can also give the Action a prompt. Then it runs on any GitHub event, for example to turn issues into pull requests. Source 1সোর্স 1 The current major version is v1, so workflows use anthropics/claude-code-action@v1. Source 1সোর্স 1 Source 2সোর্স 2

The Action has two modes. If the workflow has no prompt input, the mode is interactive. Claude waits for the trigger phrase (@claude by default) in a comment, a review, or a new issue. It replies in a comment on the issue or PR. If the workflow has a prompt input, the mode is automation. Claude runs without a mention, and by default the result goes to the workflow run log. Source 1সোর্স 1

Code Review is a different product with the Claude Code name. It reviews every pull request automatically, with no workflow file. This page is only about the workflow integration. Source 1সোর্স 1

বাংলা ব্যাখ্যা

Claude Code GitHub Action হলো একটি GitHub Action, যার নাম anthropics/claude-code-action। এটি আপনার repository-র workflow-এর ভেতরে Claude Code চালায়। Source 1সোর্স 1 কোনো pull request বা issue-এর comment-এ @claude লিখলে Claude code বিশ্লেষণ করে, পরিবর্তন করে এবং commit push করে। Source 1সোর্স 1 Action-কে একটি prompt দিলে এটি যেকোনো GitHub event-এ চলে, যেমন issue থেকে pull request তৈরি করতে। Source 1সোর্স 1 বর্তমান major version হলো v1, তাই workflow-গুলো anthropics/claude-code-action@v1 ব্যবহার করে। Source 1সোর্স 1 Source 2সোর্স 2

Action-টির দুটি mode আছে। Workflow-এ prompt input না থাকলে mode হলো interactive: Claude একটি comment, review বা নতুন issue-এ trigger phrase-এর (default হিসেবে @claude) জন্য অপেক্ষা করে, আর issue বা PR-এর একটি comment-এ উত্তর দেয়। Workflow-এ prompt input থাকলে mode হলো automation: Claude কোনো mention ছাড়াই চলে, আর ফলাফল default হিসেবে workflow run log-এ যায়। Source 1সোর্স 1

Claude Code নামে আরও কয়েকটি product আছে। যেমন Code Review কোনো workflow file ছাড়াই প্রতিটি pull request-এ automatic review দেয়। এই পেজে শুধু workflow integration নিয়ে বলা হয়েছে। Source 1সোর্স 1

Set it up

You need admin access to the repository for both setup paths. Source 1সোর্স 1

Quick setup

Open claude in the repository and run /install-github-app. Source 1সোর্স 1

  • The command needs the GitHub CLI, signed in with gh auth login. Source 1সোর্স 1
  • It works only with github.com repositories. Source 1সোর্স 1
  • Claude Code installs the Claude GitHub App and saves the credential as a repository secret: ANTHROPIC_API_KEY for an API key, or CLAUDE_CODE_OAUTH_TOKEN for a subscription token. Source 1সোর্স 1
  • Claude Code then pushes a branch with the workflow files and opens GitHub in your browser with a pull request ready to create. Create and merge that pull request, and @claude works in the repository. Source 1সোর্স 1

Manual setup

  1. Install the Claude GitHub App on the repository. Source 1সোর্স 1
  2. Add a secret: ANTHROPIC_API_KEY with a key from the Claude Console, or CLAUDE_CODE_OAUTH_TOKEN from claude setup-token. The token needs a Pro, Max, Ultra, Team, or Enterprise plan. Source 1সোর্স 1
  3. Copy examples/claude.yml from the Action's repository into .github/workflows/. Source 1সোর্স 1

In the workflow, pass the secret to the matching input: anthropic_api_key or claude_code_oauth_token. Source 1সোর্স 1

  • The Action uses three permissions of the app: Contents, Issues, and Pull requests, each with read and write. Source 1সোর্স 1
  • The app's full permission set is larger, because other Claude features share it. GitHub does not let you accept a subset. Source 1সোর্স 1
  • For a secret that many repositories share, the docs advise a Console API key, because an OAuth token is tied to the subscription of one person. Source 1সোর্স 1
  • Workload identity federation avoids a stored secret. It needs the id-token: write permission. Source 1সোর্স 1

সহজ English

For both setup paths, you need admin access to the repository. Source 1সোর্স 1

Quick setup

  1. Open claude in the repository and run /install-github-app. Source 1সোর্স 1
  2. The command needs the GitHub CLI. You must be signed in with gh auth login. Source 1সোর্স 1
  3. The command works only with github.com repositories. Source 1সোর্স 1
  4. Claude Code installs the Claude GitHub App. It saves your credential as a repository secret. Source 1সোর্স 1
  5. The secret is ANTHROPIC_API_KEY for an API key. It is CLAUDE_CODE_OAUTH_TOKEN for a subscription token. Source 1সোর্স 1
  6. Claude Code pushes a branch with the workflow files. It opens GitHub in your browser with a pull request ready to create. Source 1সোর্স 1
  7. Create and merge that pull request. Then @claude works in the repository. Source 1সোর্স 1

Manual setup

  1. Install the Claude GitHub App on the repository. Source 1সোর্স 1
  2. Add a secret. Use ANTHROPIC_API_KEY with a key from the Claude Console. Or use CLAUDE_CODE_OAUTH_TOKEN from claude setup-token. Source 1সোর্স 1
  3. The token needs a Pro, Max, Ultra, Team, or Enterprise plan. Source 1সোর্স 1
  4. Copy examples/claude.yml from the Action's repository into .github/workflows/. Source 1সোর্স 1
  5. In the workflow, pass the secret to the matching input. Use anthropic_api_key or claude_code_oauth_token. Source 1সোর্স 1

Good to know

  • The Action uses three permissions of the app: Contents, Issues, and Pull requests. Each has read and write access. Source 1সোর্স 1
  • The app's full permission list is larger, because other Claude features share it. GitHub does not let you accept only a part. Source 1সোর্স 1
  • Many repositories may share one secret. Then the docs advise a Console API key. An OAuth token is tied to the subscription of one person. Source 1সোর্স 1
  • Workload identity federation avoids a stored secret. It needs the id-token: write permission. Source 1সোর্স 1

বাংলা ব্যাখ্যা

দুটি setup পদ্ধতির জন্যই repository-তে আপনার admin access লাগবে। Source 1সোর্স 1

Quick setup: repository-তে claude খুলে /install-github-app চালান। এই command-এর জন্য GitHub CLI লাগবে, gh auth login দিয়ে sign in করা অবস্থায়। এটি শুধু github.com repository-তে কাজ করে। Command-টি Claude GitHub App install করে এবং credential-টি repository secret হিসেবে save করে: API key হলে ANTHROPIC_API_KEY, subscription token হলে CLAUDE_CODE_OAUTH_TOKEN। তারপর এটি workflow file-সহ একটি branch push করে এবং browser-এ একটি তৈরি pull request-সহ GitHub খোলে। সেই pull request তৈরি করে merge করলেই @claude কাজ করবে। Source 1সোর্স 1

Manual setup: repository-তে Claude GitHub App install করুন। Claude Console-এর key দিয়ে ANTHROPIC_API_KEY, অথবা claude setup-token থেকে CLAUDE_CODE_OAUTH_TOKEN secret যোগ করুন। Token-এর জন্য Pro, Max, Ultra, Team অথবা Enterprise plan লাগবে। Action-এর repository থেকে examples/claude.yml file-টি .github/workflows/-এ copy করুন। Workflow-এ secret-টি মিলিয়ে anthropic_api_key বা claude_code_oauth_token input-এ দিন। Source 1সোর্স 1

Action-টি app-এর তিনটি permission ব্যবহার করে: Contents, Issues ও Pull requests, প্রতিটিতে read ও write। অনেক repository একটি secret share করলে docs একটি Console API key ব্যবহারের পরামর্শ দেয়, কারণ OAuth token একজন মানুষের subscription-এর সাথে যুক্ত। Workload identity federation ব্যবহার করলে secret store করতে হয় না; এর জন্য id-token: write permission লাগে। Source 1সোর্স 1

Respond to @claude in issues and PRs

The docs show this workflow for @claude mentions: Source 1সোর্স 1

name: Claude Code
on:
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]
jobs:
  claude:
    if: contains(github.event.comment.body, '@claude')
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
      issues: write
      id-token: write
      actions: read
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 1
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

Claude replies in a comment on the same issue or PR and updates it as it works. Source 1সোর্স 1

Who can trigger a run

QA example: ask for missing tests

Example

These comments are example requests from a tester. The docs show the same form, such as @claude fix the TypeError in the user dashboard component. Source 1সোর্স 1

@claude add unit tests for the changes in this PR. Follow the test conventions in CLAUDE.md. Cover the empty, maximum, and invalid inputs.
@claude explain why the checkout test failed in the last CI run and propose a fix.
  • Put your test standards in CLAUDE.md. Claude follows its guidelines when it creates PRs and answers requests. Source 1সোর্স 1 See CLAUDE.md & Memory.
  • By default, Claude does not create a pull request. It commits to a new branch and gives a link to the PR creation page. A person creates the PR. Source 3সোর্স 3
  • GitHub does not trigger workflows on commits made with the default GITHUB_TOKEN. To get your tests to run on Claude's commits, do not pass github_token: ${{ secrets.GITHUB_TOKEN }}, so the Action authenticates as the Claude GitHub App. Source 1সোর্স 1

সহজ English

The docs show a workflow. It runs when a new comment contains @claude. Source 1সোর্স 1

A few settings in it matter:

Claude replies in a comment on the same issue or PR. It updates that comment as it works. Source 1সোর্স 1

Who can start a run

A tester's example

A tester can write a comment like @claude add unit tests for the changes in this PR. The docs show requests in the same form. Source 1সোর্স 1

Put your test standards in CLAUDE.md. Claude follows its guidelines when it creates PRs and answers requests. Source 1সোর্স 1

By default, Claude does not create a pull request. It saves its work on a new branch. It gives you a link to the page where a PR is created. A person then creates the PR. Source 3সোর্স 3

GitHub does not start workflows for commits made with the default GITHUB_TOKEN. You want your tests to run on Claude's commits. So do not pass github_token: ${{ secrets.GITHUB_TOKEN }}. Then the Action signs in as the Claude GitHub App. Source 1সোর্স 1

বাংলা ব্যাখ্যা

Docs-এ একটি workflow দেখানো হয়েছে, যা কোনো নতুন comment-এ @claude থাকলে চলে। Source 1সোর্স 1 এতে id-token: write default GitHub App authentication-এর জন্য দরকার, actions: read দিয়ে Claude PR-এর CI result পড়তে পারে, আর actions/checkout Claude-কে repository-র একটি local copy দেয়। Claude একই issue বা PR-এ একটি comment-এ উত্তর দেয় এবং কাজ করার সময় সেটি update করে। Source 1সোর্স 1

Issue ও PR event-এ যে user run trigger করেন, repository-তে তাঁর write access থাকতে হবে। কোনো bot-কে allowed_bots-এ না রাখলে Action সেটিকে reject করে। Source 1সোর্স 1 allowed_non_write_users write-access check এড়িয়ে যায়। Security docs এটিকে ঝুঁকিপূর্ণ বলে এবং শুধু খুব সীমিত permission-এর workflow-এ এটি ব্যবহারের পরামর্শ দেয়। Source 3সোর্স 3

একজন tester লিখতে পারেন, যেমন @claude add unit tests for the changes in this PR। আপনার test standard CLAUDE.md-এ রাখুন, কারণ Claude এর guideline মেনে চলে। Source 1সোর্স 1 Default হিসেবে Claude pull request তৈরি করে না। এটি একটি নতুন branch-এ commit করে এবং PR তৈরির পেজের link দেয়; PR-টি একজন মানুষ তৈরি করেন। Source 3সোর্স 3 Default GITHUB_TOKEN দিয়ে করা commit-এ GitHub workflow চালায় না। Claude-এর commit-এ আপনার test চালাতে চাইলে github_token: ${{ secrets.GITHUB_TOKEN }} দেবেন না, তাহলে Action Claude GitHub App হিসেবে authenticate করবে। Source 1সোর্স 1

Review pull requests automatically

The docs show this workflow. It installs the code-review plugin and runs its skill when a PR is opened, updated, reopened, or marked ready for review: Source 1সোর্স 1

name: Code Review
on:
  pull_request:
    types: [opened, synchronize, ready_for_review, reopened]
jobs:
  review:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: read
      issues: read
      id-token: write
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 1
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          plugin_marketplaces: "https://github.com/anthropics/claude-plugins-official.git"
          plugins: "code-review@claude-plugins-official"
          prompt: "/code-review:code-review --comment ${{ github.repository }}/pull/${{ github.event.pull_request.number }}"
          claude_args: '--allowedTools "mcp__github_inline_comment__create_inline_comment"'
  • With --comment, Claude posts the review on the PR: an inline comment for each issue, or one summary comment if it finds none. Without it, the findings stay in the run log. Source 1সোর্স 1
  • Keep the claude_args line. The Action starts the MCP server for inline comments only when --allowedTools in claude_args names it. Source 1সোর্স 1
  • Claude skips draft and closed PRs, PRs that it judges do not need a review, and PRs that already have a comment from Claude. Source 1সোর্স 1
  • On public repositories, GitHub withholds secrets from runs that fork PRs trigger. The review runs only on PRs from branches in the same repository. Source 1সোর্স 1

সহজ English

The docs show a workflow that installs the code-review plugin. It runs its skill when a PR is opened, updated, reopened, or marked ready for review. Source 1সোর্স 1 With --comment, Claude posts the review on the PR: an inline comment for each issue, or one summary comment if it finds none. Without --comment, the findings stay in the run log. Keep the claude_args line, because the Action starts the MCP server for inline comments only when --allowedTools names it. Source 1সোর্স 1 Claude skips draft PRs, closed PRs, PRs that it thinks need no review, and PRs that already have a Claude comment. On public repositories, the review runs only on PRs from branches in the same repository. Source 1সোর্স 1

বাংলা ব্যাখ্যা

Docs-এর workflow-টি code-review plugin install করে। কোনো PR open, update, reopen বা ready for review হলে এটি plugin-এর skill চালায়। Source 1সোর্স 1 --comment দিলে Claude PR-এ review post করে: প্রতিটি issue-এর জন্য একটি inline comment, অথবা কোনো issue না পেলে একটি summary comment। --comment না দিলে findings run log-এ থেকে যায়। claude_args line-টি রাখুন, কারণ claude_args-এর --allowedTools-এ নাম থাকলেই কেবল Action inline comment-এর MCP server চালু করে। Source 1সোর্স 1 Claude draft ও closed PR, যে PR-এর review দরকার নেই বলে মনে করে সেগুলো, আর যে PR-এ আগেই Claude-এর comment আছে সেগুলো skip করে। Public repository-তে fork PR থেকে শুরু হওয়া run-কে GitHub secret দেয় না, তাই review শুধু একই repository-র branch থেকে আসা PR-এ চলে। Source 1সোর্স 1

Run your own skill as the prompt

The prompt input accepts plain text or a skill: Source 1সোর্স 1

  • For a skill in .claude/skills/, run actions/checkout before the Action step, then pass /skill-name as the prompt. Source 1সোর্স 1
  • For a skill in a plugin, install it with plugin_marketplaces and plugins, then pass /plugin-name:skill-name. Source 1সোর্স 1
  • For a plain-text prompt, Claude has no shell or GitHub API access until you grant tools. Grant them with --allowedTools in claude_args or a permissions.allow rule in the settings input. A skill can use the tools that its allowed-tools frontmatter grants. Source 1সোর্স 1

QA example: review the tests in every PR

Example

This workflow is the tutorial's example. It replaces the plugin in the docs workflow with a repository skill, /review-tests, that you write yourself. It uses only the inputs and arguments that the docs show. Source 1সোর্স 1

name: Test Review
on:
  pull_request:
    types: [opened, synchronize, ready_for_review, reopened]
jobs:
  review-tests:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: read
      issues: read
      id-token: write
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 1
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          prompt: "/review-tests"
          claude_args: |
            --max-turns 10
            --allowedTools "mcp__github_inline_comment__create_inline_comment"

Write the review-tests skill to check three things for each changed source file:

  • Is there a test?
  • Are the assertions strong enough to fail on a real bug?
  • Does the test depend on timing or shared data that makes it flaky?

The Skills & Commands page shows how to write a skill and its allowed-tools.

সহজ English

The prompt input can be plain text or a skill. For a skill in .claude/skills/, run actions/checkout first. A plain-text prompt has no shell or GitHub API access until you grant tools. Source 1সোর্স 1

The tutorial's example runs /review-tests, a skill that you write. For each changed source file, it checks for a test, for strong assertions, and for timing or shared data that makes the test flaky.

বাংলা ব্যাখ্যা

prompt input-এ plain text বা একটি skill দেওয়া যায়। .claude/skills/-এর skill-এর জন্য আগে actions/checkout চালিয়ে prompt-এ /skill-name দিন। Plugin-এর skill-এর জন্য plugin_marketplaces ও plugins দিয়ে install করে /plugin-name:skill-name দিন। Plain-text prompt-এ claude_args-এর --allowedTools বা settings input-এর permissions.allow rule দিয়ে tool না দেওয়া পর্যন্ত Claude-এর shell বা GitHub API access থাকে না। Source 1সোর্স 1

Tutorial-এর example-এ আপনার নিজের লেখা /review-tests skill চলে। Skill-টি প্রতিটি পরিবর্তিত source file-এর জন্য তিনটি জিনিস দেখে: test আছে কি না, assertion আসল bug-এ fail করার মতো শক্ত কি না, আর test timing বা shared data-র ওপর নির্ভর করে flaky হয় কি না।

Structured results and scheduled runs

Triage a flaky test

Add --json-schema to claude_args, and the Action returns validated JSON in the step output structured_output, as one JSON string. Source 4সোর্স 4 The Action's usage docs show this flaky-test example: Source 4সোর্স 4

- name: Detect flaky tests
  id: analyze
  uses: anthropics/claude-code-action@v1
  with:
    anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
    prompt: |
      Check the CI logs and determine if this is a flaky test.
      Return: is_flaky (boolean), confidence (0-1), summary (string)
    claude_args: |
      --json-schema '{"type":"object","properties":{"is_flaky":{"type":"boolean"},"confidence":{"type":"number"},"summary":{"type":"string"}},"required":["is_flaky"]}'

- name: Retry if flaky
  if: fromJSON(steps.analyze.outputs.structured_output || '{}').is_flaky == true
  run: gh workflow run CI

A retry hides a flaky test. It does not fix it. Also record the summary in a flaky-test ticket, so the team fixes the cause.

Run on a schedule

With a prompt input, the Action runs on any event, including a cron schedule. Source 1সোর্স 1

Example: a nightly prompt such as Summarize yesterday's failed test runs and list the tests that failed more than once, with only the tools that the prompt needs.

সহজ English

Add --json-schema to claude_args. The Action then returns validated JSON in the step output structured_output, as one JSON string. Source 4সোর্স 4 The usage docs show an example: Claude checks the CI logs and decides if a test is flaky. If is_flaky is true, the next step runs the CI workflow again. Source 4সোর্স 4 A retry hides a flaky test, but it does not fix it. Also record the summary in a flaky-test ticket, so the team fixes the cause.

With a prompt input, the Action can also run on a cron schedule. Source 1সোর্স 1 GitHub runs scheduled workflows only from the default branch. In public repositories, GitHub turns off a schedule after 60 days with no repository activity. Source 1সোর্স 1 For example, a nightly prompt can summarize yesterday's failed test runs. Give it only the tools that it needs.

বাংলা ব্যাখ্যা

claude_args-এ --json-schema যোগ করলে Action step output structured_output-এ validated JSON দেয়, একটি JSON string হিসেবে। Source 4সোর্স 4 Action-এর usage docs-এ একটি flaky-test example আছে: Claude CI log দেখে ঠিক করে test-টি flaky কি না। is_flaky true হলে পরের step gh workflow run CI দিয়ে CI আবার চালায়। Source 4সোর্স 4 Retry একটি flaky test-কে লুকিয়ে রাখে, ঠিক করে না। তাই summary-টি একটি flaky-test ticket-এ লিখে রাখুন, যাতে team মূল কারণটি ঠিক করে।

prompt input থাকলে Action যেকোনো event-এ চলে, cron schedule-সহ। Source 1সোর্স 1 GitHub scheduled workflow শুধু default branch থেকে চালায়। Public repository-তে 60 দিন কোনো repository activity না থাকলে GitHub schedule বন্ধ করে দেয়। Source 1সোর্স 1 যেমন, একটি nightly prompt গতকালের failed test run-এর summary দিতে পারে। এতে শুধু দরকারি tool-গুলো দিন।

Pass CLI arguments

claude_args accepts any Claude Code CLI argument. An example from the docs: Source 1সোর্স 1

claude_args: "--max-turns 5 --model claude-sonnet-5 --mcp-config /path/to/config.json"
ArgumentUse
--max-turnsLimits the number of conversation turns Source 1সোর্স 1
--modelSelects the model. Without it, the Action uses the Claude Code default model. Source 1সোর্স 1
--mcp-configPath to an MCP configuration Source 1সোর্স 1
--allowedToolsComma-separated list of allowed tools. The --allowed-tools alias also works. Source 1সোর্স 1
--debugTurns on debug output Source 1সোর্স 1

In --allowedTools, use the permission rule form that the Claude Code docs use, for example Bash(git diff *). See Headless & CI.

সহজ English

Use claude_args to give the Action any Claude Code CLI argument. Source 1সোর্স 1 Some arguments:

  • --max-turns sets a limit on the number of conversation turns.
  • --model selects the model. Without it, the Action uses the Claude Code default model.
  • --mcp-config gives the path to an MCP configuration.
  • --allowedTools gives a comma-separated list of the allowed tools. The --allowed-tools alias also works.
  • --debug turns on debug output. Source 1সোর্স 1

In --allowedTools, write each tool as a permission rule, for example Bash(git diff *).

বাংলা ব্যাখ্যা

claude_args যেকোনো Claude Code CLI argument নেয়। Source 1সোর্স 1 কয়েকটি argument:

  • --max-turns: conversation turn-এর সংখ্যা সীমিত করে।
  • --model: model বেছে নেয়। এটি না দিলে Action Claude Code-এর default model ব্যবহার করে।
  • --mcp-config: একটি MCP configuration-এর path।
  • --allowedTools: অনুমোদিত tool-গুলোর comma-separated list। --allowed-tools alias-ও কাজ করে।
  • --debug: debug output চালু করে। Source 1সোর্স 1

--allowedTools-এ Claude Code docs-এর permission rule-এর রূপ ব্যবহার করুন, যেমন Bash(git diff *)। বিস্তারিত Headless & CI পেজে আছে।

Control cost and risk

Never commit keys

Never commit API keys or OAuth tokens to the repository. Store them as GitHub Secrets, for example anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}. Give the workflow only the permissions it needs, and review Claude's changes before you merge. Source 1সোর্স 1

Cost

Each run uses GitHub Actions minutes and API tokens. If you authenticate with an OAuth token, runs use your Claude subscription instead of API billing. Source 1সোর্স 1 The docs list these controls: Source 1সোর্স 1

  • Write specific @claude requests, so Claude needs fewer turns.
  • Use issue templates to give context up front.
  • Keep CLAUDE.md short, because Claude reads it on every run.
  • Set --max-turns in claude_args.
  • Set workflow-level timeouts.
  • Use GitHub's concurrency controls to limit parallel runs.

Risk

  • On pull requests, the Action restores .claude/, .mcp.json, .claude.json, .gitmodules, .ripgreprc, CLAUDE.md, CLAUDE.local.md, AGENTS.md, and .husky/ from the base branch before Claude starts. Source 3সোর্স 3 A PR cannot change those files to steer the run.
  • pull_request_target and workflow_run run with the base repository's secrets. If you check out the PR head into the workspace before the Action, Claude works on that checkout. Source 3সোর্স 3 Do not do this for untrusted PRs.
  • Hidden text in comments can carry instructions. The Action strips HTML comments, invisible characters, image alt text, hidden HTML attributes, and HTML entities, but new bypass techniques may appear. Source 3সোর্স 3
  • On public repositories, include_comments_by_actor limits which users' comments go to Claude. Source 3সোর্স 3
  • Claude's commits are unsigned by default. Source 3সোর্স 3 show_full_output is off by default for security reasons. Keep it off. Source 3সোর্স 3

সহজ English

Never commit API keys or OAuth tokens to the repository. Keep them in GitHub Secrets. Give the workflow only the permissions that it needs, and review Claude's changes before you merge. Source 1সোর্স 1

Each run uses GitHub Actions minutes and API tokens. With an OAuth token, runs use your Claude subscription, not API billing. To use less, write specific @claude requests, use issue templates, keep CLAUDE.md short, set --max-turns, set workflow timeouts, and limit parallel runs with GitHub's concurrency controls. Source 1সোর্স 1

On pull requests, the Action restores files such as .claude/, .mcp.json, and CLAUDE.md from the base branch before Claude starts. Thus a PR cannot change them to control the run. pull_request_target and workflow_run runs have the secrets of the base repository, so do not check out the head of an untrusted PR before the Action. The Action removes hidden text, such as HTML comments and invisible characters, from comments. But new bypass techniques can appear. Claude's commits are unsigned by default. Keep show_full_output off. Source 3সোর্স 3

বাংলা ব্যাখ্যা

API key বা OAuth token কখনো repository-তে commit করবেন না। এগুলো GitHub Secrets-এ রাখুন। Workflow-কে শুধু দরকারি permission দিন, আর merge করার আগে Claude-এর পরিবর্তন review করুন। Source 1সোর্স 1

প্রতিটি run GitHub Actions minutes ও API token খরচ করে। OAuth token দিয়ে authenticate করলে run-গুলো API billing-এর বদলে আপনার Claude subscription ব্যবহার করে। খরচ কমাতে নির্দিষ্ট @claude request লিখুন, issue template ব্যবহার করুন, CLAUDE.md ছোট রাখুন, --max-turns ও workflow-level timeout দিন, আর GitHub-এর concurrency control দিয়ে parallel run সীমিত করুন। Source 1সোর্স 1

Pull request-এ Claude শুরু হওয়ার আগে Action .claude/, .mcp.json, CLAUDE.md-সহ কিছু file base branch থেকে ফিরিয়ে আনে, তাই কোনো PR এগুলো বদলে run নিয়ন্ত্রণ করতে পারে না। pull_request_target ও workflow_run base repository-র secret নিয়ে চলে, তাই untrusted PR-এর head Action-এর আগে checkout করবেন না। Comment-এর লুকানো text-এ instruction থাকতে পারে। Action HTML comment, invisible character-এর মতো লুকানো text সরিয়ে দেয়, তবে নতুন bypass কৌশল আসতে পারে। Public repository-তে include_comments_by_actor ঠিক করে কোন user-দের comment Claude-এর কাছে যাবে। Default হিসেবে Claude-এর commit unsigned থাকে। show_full_output default হিসেবে off থাকে; এটি off-ই রাখুন। Source 3সোর্স 3

Upgrade from beta and troubleshoot

To move a workflow from @beta to @v1: Source 1সোর্স 1

  1. Change @beta to @v1 in the uses line.
  2. Remove the mode input. The Action detects the mode.
  3. Replace direct_prompt with prompt.
  4. Move max_turns and model into claude_args. Replace custom_instructions with --append-system-prompt.

The usage docs also list allowed_tools as deprecated. Use --allowedTools in claude_args. Source 4সোর্স 4 A tutorial that shows direct_prompt: or allowed_tools: inputs is out of date.

If Claude does not respond to @claude: Source 1সোর্স 1

  • Check that the GitHub App is installed and workflows are on for the repository.
  • Check that the API key or OAuth token is in the repository secrets.
  • Write @claude as a complete word, not /claude or @claude-bot.
  • Check that the user who comments has write access.

To use Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry, set use_bedrock, use_vertex, or use_foundry to "true", and authenticate through OIDC. Source 1সোর্স 1

সহজ English

To move a workflow from @beta to @v1, change @beta to @v1 in the uses line. Remove the mode input. Replace direct_prompt with prompt. Move max_turns and model into claude_args, and replace custom_instructions with --append-system-prompt. Source 1সোর্স 1 Also replace the deprecated allowed_tools input with --allowedTools in claude_args. Source 4সোর্স 4 If a tutorial shows direct_prompt: or allowed_tools:, it is out of date.

If Claude does not reply to @claude, check these items: Source 1সোর্স 1

  • The GitHub App is installed, and workflows are on.
  • The API key or OAuth token is in the repository secrets.
  • @claude is a complete word, not /claude or @claude-bot.
  • The user who comments has write access.

For Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry, set use_bedrock, use_vertex, or use_foundry to "true". Then authenticate through OIDC. Source 1সোর্স 1

বাংলা ব্যাখ্যা

@beta থেকে @v1-এ যেতে uses line-এ @beta-কে @v1 করুন। mode input সরিয়ে দিন। direct_prompt-এর বদলে prompt দিন। max_turns ও model claude_args-এ নিন, আর custom_instructions-এর বদলে --append-system-prompt দিন। Source 1সোর্স 1 Usage docs allowed_tools-কেও deprecated বলে; এর বদলে claude_args-এ --allowedTools দিন। Source 4সোর্স 4 কোনো tutorial-এ direct_prompt: বা allowed_tools: input থাকলে সেটি পুরোনো।

@claude-এ Claude সাড়া না দিলে এগুলো দেখুন: Source 1সোর্স 1

  • GitHub App install করা আছে এবং workflow চালু আছে কি না।
  • API key বা OAuth token repository secret-এ আছে কি না।
  • @claude পুরো শব্দ হিসেবে লেখা হয়েছে কি না, /claude বা @claude-bot নয়।
  • Comment করা user-এর write access আছে কি না।

Amazon Bedrock, Google Cloud-এর Agent Platform বা Microsoft Foundry ব্যবহার করতে use_bedrock, use_vertex বা use_foundry-কে "true" করুন এবং OIDC দিয়ে authenticate করুন। Source 1সোর্স 1

  1. [1]
    Claude Code GitHub Actions

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  2. [2]
    claude-code-action releases

    Anthropic (GitHub) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  3. [3]
    claude-code-action docs/security.md

    Anthropic (GitHub) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  4. [4]
    claude-code-action docs/usage.md (inputs and outputs)

    Anthropic (GitHub) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10