Claude CI Integration
Loquent uses two GitHub Actions workflows powered by Claude Code Action to provide automated code review and on-demand AI assistance directly in PRs and issues.
Automated Code Review
Section titled “Automated Code Review”Every pull request automatically triggers a Claude-powered code review.
Workflow file: .github/workflows/claude-code-review.yml
name: Claude Code Review
on: pull_request: types: [opened, synchronize, ready_for_review, reopened]
jobs: claude-review: runs-on: ubuntu-latest permissions: contents: read pull-requests: read issues: read id-token: write
steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 1
- name: Run Claude Code Review uses: anthropics/claude-code-action@v1 with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} plugin_marketplaces: 'https://github.com/anthropics/claude-code.git' plugins: 'code-review@claude-code-plugins' prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'This runs on every PR event — when a PR is opened, updated with new commits, marked ready for review, or reopened. Claude reviews the diff using the code-review plugin and posts its findings as PR comments.
Optional Filters
Section titled “Optional Filters”You can restrict reviews to specific file patterns or PR authors by uncommenting the configuration blocks in the workflow file:
# Only review changes to specific pathspaths: - "src/**/*.rs"
# Only review PRs from specific authorsif: | github.event.pull_request.user.login == 'external-contributor' || github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'On-Demand Claude Assistance
Section titled “On-Demand Claude Assistance”Mention @claude in any issue or PR comment to get AI assistance on demand.
Workflow file: .github/workflows/claude.yml
name: Claude Code
on: issue_comment: types: [created] pull_request_review_comment: types: [created] issues: types: [opened, assigned] pull_request_review: types: [submitted]Claude responds when @claude appears in:
- Issue comments — ask Claude to analyze, suggest fixes, or explain code
- PR review comments — get help with specific code changes inline
- New issues — include
@claudein the title or body for automatic analysis - PR reviews — mention
@claudein your review body
Permissions
Section titled “Permissions”The on-demand workflow includes actions: read permission, which lets Claude read CI results on PRs to provide context-aware assistance.
permissions: contents: read pull-requests: read issues: read id-token: write actions: readBoth workflows require the CLAUDE_CODE_OAUTH_TOKEN repository secret. This token authenticates with the Anthropic Claude Code service.
To configure it:
- Go to Settings → Secrets and variables → Actions in the GitHub repository
- Add a new repository secret named
CLAUDE_CODE_OAUTH_TOKEN - Set the value to your Claude Code OAuth token