Overview
Check code that Claude Code wrote through several layers: shared review rules in CLAUDE.md, a lint hook, a read-only review session, the GitHub Action review workflow and a human merge decision.
Problem or Objective
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Claude Code · GitHub Actions
- Prerequisites
- Claude Code, a GitHub repository where you have admin access, the Claude GitHub App, and an API key or Claude subscription token stored as a repository secret.
How It Works
Write the project's coding standards and a review checklist into CLAUDE.md at the repository root, so every Claude Code session starts from the same rules. Add a hook that runs your linter before each commit, so formatting slips and simple errors are caught mechanically. Before opening a pull request, start a fresh Claude Code session and ask it to review the branch against the checklist, run the test suite and list findings by severity without editing files; fix the findings you accept. Set up the Claude Code GitHub Action with the review workflow, so Claude posts inline comments on each pull request. Finally a person reads the diff and Claude's comments and decides whether to merge. Merging stays with that person in every case.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Claude Code.
- Connect the toolsConnect the tools this workflow relies on: Claude Code, GitHub Actions.
- Check the prerequisitesClaude Code, a GitHub repository where you have admin access, the Claude GitHub App, and an API key or Claude subscription token stored as a repository secret.
- Gather your detailsCollect what the prompt asks for: Branch to compare against, Areas that need the closest look, Command that runs the tests.
- Run the starter promptPaste the starter prompt below into Claude Code and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at code.claude.com before you rely on it.
Practical Starter Prompt: Review my branch before a pull request
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Review the changes on this branch against [Branch to compare against]. Use the review checklist in CLAUDE.md and look hardest at [Areas that need the closest look]. Run [Command that runs the tests] and report the result. List each finding with the file, the line, a severity and a suggested fix. Do not edit any files, commit or push: I will decide which findings to act on.Run this in a fresh session rather than the one that wrote the code. Apply the fixes you accept yourself or in another session, then open the pull request and let the review workflow comment. A person approves and merges.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. Anthropic's Claude Code overview says CLAUDE.md is read at the start of every session and can hold review checklists, and that hooks can run lint before a commit. The GitHub Actions page says the review workflow posts an inline comment on each issue it finds, or one summary comment when it finds none. The pages describe the tools, not how well the layers work together, so judge that on your own pull requests.
Limitations and Considerations
Setting up the GitHub Action needs admin access to the repository and stores an API key or a subscription token as a repository secret. On public repositories, GitHub withholds secrets from runs triggered by fork pull requests, so the review only runs on pull requests from branches in the same repository. Check whether the review layers catch what the writing session missed, for example by planting a known bug in a test branch once. Check the cost of review runs on your plan or API account. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Related Videos
About anthropics/claude-code
The SECRET Claude Code Upgrade That Has Everyone Going Nuts (Full Guide) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)About anthropics/claude-code
The only Claude Code guide you'll ever need (Opus 4.5) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- Overview - Claude Code Docs (opens in a new tab)
Project documentation · code.claude.com · Undated · Source checked 25 Nov 2026, 11:57 UTC
What this source supports
- CLAUDE.md is a markdown file you add to your project root that Claude Code reads at the start of every session.
- Use it to set coding standards, architecture decisions, preferred libraries, and review checklists.
- Hooks let you run shell commands before or after Claude Code actions, like auto-formatting after every file edit or running lint before a commit.
- Claude Code GitHub Actions - Claude Code Docs (opens in a new tab)
Project documentation · code.claude.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- If you select the review workflow, Claude posts each review on the pull request itself, as an inline comment on each issue it finds or as one summary comment when it finds none.
- For either path, you need admin access to the repository.

