Traditional linters are excellent at what they can express as rules, formatting, unused variables, known-bad patterns. They are blind to everything else, a retry loop that can duplicate…
Traditional linters are excellent at what they can express as rules, formatting, unused variables, known-bad patterns. They are blind to everything else, a retry loop that can duplicate a payment, a query that's correct but will scan a million rows, a function whose name promises one thing and does another. Large language models can read a diff the way a reviewer does and comment on intent, edge cases, and risk.
Wired into a pull request workflow, that gives every PR a fast first review before a human opens it. Done carelessly, it also gives you noisy comments, surprise bills, and a new attack surface. This guide shows how to add LLM-based review to GitHub Actions deliberately, where it fits in your pipeline, a working workflow, how to write prompts that produce useful comments, and the security and cost controls that make it safe to run on every PR.
Where LLM Review Fits in the Pipeline LLM review is a complement to deterministic checks, not a replacement. Layer them by cost and reliability: Layer Tool examples Catches Blocks merge? 1. Format and lint Prettier, ESLint, ruff Style, simple bugs Yes 2. Static analysis and security SonarQube, CodeQL, dependency audits Known vulnerability patterns 3. Tests Unit, contract, E2E Behavioral regressions 4. LLM review claude-code-action or similar Logic risks, missing tests, unclear intent No (advisory) 5. Human review Your team Design, product fit, accountability Two principles follow.
Run the cheap, deterministic layers first, so the LLM doesn't spend tokens flagging a missing semicolon. And keep LLM review advisory, its output is probabilistic, so it should inform reviewers, not gate merges. (Our guides on SonarQube quality gates and dependency auditing cover layers 2 and the supply-chain side.) Step 1 - Set Up Access Anthropic's official option is the anthropics/claude-code-action GitHub Action, which runs Claude Code on a GitHub-hosted runner.
Setup has two parts: Install the Claude GitHub App on the repository (or run /install-github-app from Claude Code, which opens a PR with starter workflows). Add your API key as a repository secret named ANTHROPIC_API_KEY under Settings → Secrets and variables → Actions. You can also build your own step by calling an LLM API from a script.
This is a source-linked briefing. Read the original report from Dev Community .