TAKT Action

April 24, 2026 ยท View on GitHub

๐Ÿ‡ฏ๐Ÿ‡ต ๆ—ฅๆœฌ่ชžใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆ

AI-powered PR review and task automation GitHub Action using TAKT.

Setup

Required Repository Setting

To allow this action to create pull requests, enable the following repository setting:

  1. Go to Settings โ†’ Actions โ†’ General
  2. Under Workflow permissions, check:
    • โœ… Allow GitHub Actions to create and approve pull requests
  3. Click Save

Direct link: https://github.com/OWNER/REPO/settings/actions

Note: Without this setting, the action can run workflows but cannot create pull requests. You'll see a permission error when attempting PR creation.

Quick Start

PR Review on Pull Request

name: TAKT Review
on:
  pull_request:
    types: [opened, synchronize]

permissions:
  contents: read
  pull-requests: write

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: nrslib/takt-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          github_token: ${{ secrets.GITHUB_TOKEN }}

Interactive Review via @takt Mention

name: TAKT Interactive
on:
  issue_comment:
    types: [created]

permissions:
  contents: write        # Required for pushing code changes
  issues: write          # Required for posting comments
  pull-requests: write   # Required for PR comments

jobs:
  interactive:
    if: |
      contains(github.event.comment.body, '@takt') &&
      github.event.comment.author_association == 'OWNER'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: nrslib/takt-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          github_token: ${{ secrets.GITHUB_TOKEN }}
          model: ${{ vars.TAKT_MODEL }}
          log_level: ${{ vars.TAKT_LOG_LEVEL || 'quiet' }}

Combined Workflow

name: TAKT
on:
  pull_request:
    types: [opened, synchronize]
  issue_comment:
    types: [created]

permissions:
  contents: write        # Required for pushing code changes
  issues: write          # Required for posting comments
  pull-requests: write   # Required for PR comments

jobs:
  takt:
    if: |
      github.event_name == 'pull_request' ||
      (github.event_name == 'issue_comment' &&
       contains(github.event.comment.body, '@takt') &&
       github.event.comment.author_association == 'OWNER')
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: nrslib/takt-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          github_token: ${{ secrets.GITHUB_TOKEN }}
          model: ${{ vars.TAKT_MODEL }}
          log_level: ${{ vars.TAKT_LOG_LEVEL || 'quiet' }}

      # Optional: Slack notification
      - name: Notify Slack
        if: always()
        uses: slackapi/slack-github-action@v2.0.0
        with:
          webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
          payload: |
            {
              "text": "${{ job.status == 'success' && 'โœ…' || 'โš ๏ธ' }} TAKT ${{ job.status }}",
              "blocks": [
                {
                  "type": "section",
                  "text": {
                    "type": "mrkdwn",
                    "text": "*${{ job.status == 'success' && 'โœ…' || 'โš ๏ธ' }} TAKT ${{ job.status }}*\n${{ github.event.pull_request && format('<{0}|PR #{1}>', github.event.pull_request.html_url, github.event.pull_request.number) || format('<{0}|Issue #{1}>', github.event.issue.html_url, github.event.issue.number) }}\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View logs>"
                  }
                }
              ]
            }

Inputs

InputRequiredDefaultDescription
anthropic_api_keyConditional-Anthropic API key (required when provider is claude)
openai_api_keyConditional-OpenAI API key (required when provider is codex)
github_tokenYes${{ github.token }}GitHub token for API access
workflowNodefaultTAKT workflow to execute
pieceNo-[Deprecated] Legacy alias for workflow.
modelNo(default)Model to use (opus, sonnet, haiku, etc.)
providerNoclaudeProvider to use (claude or codex)
pr_numberNo(auto-detect)Pull request number
post_reviewNotruePost review results as PR inline comments
log_levelNoquietLog level: quiet (minimal), detail (verbose), none (no output)
takt_versionNolatestTAKT CLI version (latest for npm stable, git for repository HEAD)

Supported Events

EventTriggerDescription
pull_requestopened, synchronizeAutomatic PR review
issue_commentcreated (with @takt)Interactive review and code changes

Roadmap

#FeatureStatus
#1PR diff as review context๐Ÿ”จ In progress
#2Review results as PR inline comments๐Ÿ”จ In progress
#3GitHub App distribution๐Ÿ“‹ Planned
#4Interactive review via @takt mention๐Ÿ”จ In progress
#5Code changes from PR comments๐Ÿ”จ In progress

Contributing

See CONTRIBUTING.md for details.

License

MIT - See LICENSE for details.