What you will build
This tutorial shows how to use Claude Code GitHub Actions as a comment-only SEO/GEO PR reviewer. The beginner-safe version does not rewrite the PR. It reviews risky changes, leaves findings with file references, and tells the human reviewer what to verify before merge.
You will create:
.github/workflows/claude-seo-geo-review.yml
.github/seo-geo-review-prompt.md
CLAUDE.md additions for PR review
seo-geo/pr-review/checklist.md
Use this for pull requests that touch metadata, schema, page templates, internal links, robots, sitemaps, canonical logic, redirects, analytics, docs, or large content batches.
Step 1: decide which PRs need review
Start with path filters. Do not run an AI review on every tiny dependency or styling PR.
| PR file pattern | Why it matters |
|---|---|
|
| Titles, descriptions, canonical URLs, robots tags |
|
| Structured data and rich-result eligibility |
|
| Crawl and indexing access |
|
| Redirects, localization, route behavior |
|
| Page content and answer extraction |
|
| hreflang and translated metadata |
|
| Measurement integrity |
Create a checklist file:
mkdir -p .github seo-geo/pr-review
cat > seo-geo/pr-review/checklist.md <<'EOF2'
# SEO/GEO PR Review Checklist
Review risks:
- title, meta description, canonical, robots, noindex
- sitemap, redirects, route generation, localization
- schema and JSON-LD validity
- internal links and navigation changes
- answer extraction: concise answer, evidence, FAQ, tables
- unsupported claims, invented proof, outdated stats
- analytics and conversion tracking changes
- build, lint, tests, or preview validation
Review output:
- severity: blocking / important / note
- file reference
- risk
- why it matters for SEO/GEO
- verification step
EOF2
Step 2: write the review prompt as a file
Keeping the prompt in a file makes it easier to improve over time.
cat > .github/seo-geo-review-prompt.md <<'EOF2'
Review this pull request for SEO and GEO risk.
Act as a conservative reviewer. Do not rewrite the PR unless explicitly asked.
Focus on:
- title, meta description, canonical, robots, noindex
- sitemap generation, redirects, route changes, localization, hreflang
- schema / JSON-LD validity and unsupported claims
- internal links, navigation, breadcrumbs, related content
- content that is too generic for AI answer extraction
- missing evidence, screenshots, examples, or citations
- analytics / GTM / GA4 changes
- build, lint, test, preview, and crawl validation gaps
Return findings in this format:
## Blocking
- `file`: risk, why it matters, exact verification step
## Important
- `file`: risk, why it matters, exact verification step
## Notes
- `file`: smaller improvement or follow-up
If there are no findings, say that explicitly and list residual risks.
EOF2
Step 3: ask Claude Code to generate the current workflow
Claude Code GitHub Actions setup can depend on the current action package, GitHub app setup, repository permissions, and secrets. Ask Claude Code to generate the workflow for your repo instead of guessing silently:
Help me set up Claude Code GitHub Actions for comment-only SEO/GEO PR review.
Use:
- `.github/seo-geo-review-prompt.md`
- `seo-geo/pr-review/checklist.md`
Requirements:
- Trigger only on pull requests that touch SEO/GEO-relevant paths.
- Comment findings on the PR.
- Do not push commits.
- Do not publish, deploy, submit URLs, or change secrets.
- Use the current Claude Code GitHub Action syntax from the installed/current docs.
- Tell me which GitHub app, permissions, and secrets are required.
- Create the workflow file only after explaining the plan.
Step 4: starter workflow shape
Your final workflow will vary by the current Claude Code GitHub Action version, but the shape should be close to this:
name: Claude SEO/GEO PR Review
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'src/**'
- 'app/**'
- 'pages/**'
- 'content/**'
- 'public/robots.txt'
- '**/sitemap*'
- '**/*schema*'
- '**/*seo*'
- '**/*metadata*'
- '.github/seo-geo-review-prompt.md'
- 'CLAUDE.md'
permissions:
contents: read
pull-requests: write
issues: write
jobs:
seo-geo-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Replace this with the current Claude Code GitHub Action block
# recommended by Anthropic's docs for your account.
- name: Claude SEO/GEO review
uses: anthropics/claude-code-action@beta
with:
prompt_file: .github/seo-geo-review-prompt.md
allowed_tools: 'Bash(git diff:*),Bash(git status:*),Bash(cat:*),Bash(ls:*)'
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
Before committing, verify the action name, inputs, authentication mode, and permissions against the official Claude Code GitHub Actions docs. If your organization uses the Claude GitHub app rather than an API key workflow, follow that setup instead.
Step 5: make the workflow review-only
Your first version should be boring:
contents: read, not write- PR comments allowed
- no deployment tokens
- no CMS tokens
- no Search Console or Bing submit credentials
- no automatic commits
- no merge permission
If Claude suggests using broad permissions, ask:
Reduce this GitHub Actions workflow to comment-only PR review. Explain every permission. Remove anything required for pushing commits, deployment, publishing, or URL submission.
Step 6: test on a tiny PR
Create a branch that changes one safe title or markdown page:
git checkout -b test/claude-seo-geo-review
Make a small content change, open a PR, then comment:
@claude Review this PR for SEO/GEO risk using `.github/seo-geo-review-prompt.md`. Do not make changes.
A good finding looks like this:
Important - `src/lib/seo.ts`: the canonical helper now removes locale prefixes. This may cause localized pages to canonicalize to English URLs. Verify canonical/hreflang output on one English page and one translated page before merge.
A weak finding looks like this:
Improve SEO.
If the comments are vague, tighten the prompt file and checklist.
Step 7: add repo-specific rules to CLAUDE.md
Claude's PR review gets better when your repo rules are explicit:
## PR review rules for SEO/GEO
When reviewing PRs:
- findings first, ordered by severity
- include file references and verification steps
- do not request vague SEO improvements
- never invent product claims, customer proof, ranking data, or statistics
- treat robots, sitemap, canonical, noindex, schema, redirects, analytics, and localization changes as high risk
- if no issues are found, state residual risks and testing gaps
Step 8: graduate from comment-only to suggested patches carefully
Do not allow automatic edits until comment-only reviews are useful. When you do, limit patch suggestions to low-risk items:
| Safe-ish patch | Still needs review |
|---|---|
| missing alt text | yes |
| duplicate meta description on one page | yes |
| broken internal link in markdown | yes |
| typo in FAQ heading | yes |
Keep these human-only:
- redirects and migrations
- robots/noindex changes
- canonical policy
- analytics and tag manager changes
- legal, medical, financial, or competitor claims
- case-study proof and customer logos
FAQ
Should every PR trigger Claude review?
No. Use path filters. Trigger it for SEO, content, routing, schema, localization, analytics, and page-template changes.
Can GitHub Actions replace an SEO reviewer?
No. It catches repeatable risks and creates a checklist in the PR. Humans still decide strategy, claims, and release timing.
What should I do if the action cannot access secrets?
Keep the workflow comment-only and fix authentication through the official Claude Code GitHub Actions setup. Do not paste API keys into workflow files or PR comments.
Claude Code SEO/GEO learning path
This article is part of the Claude Code SEO/GEO operator series. If you are building the workflow from scratch, follow the sequence:
- How to Use Claude Code for SEO Automation
- How to Build a Claude Code SEO/GEO Workflow Cockpit
- How to Use CLAUDE.md and Memory for SEO/GEO Workflows
- How to Refresh SEO Pages with the Claude Code VS Code Extension
- Best GEO Claude Code Skills in 2026
- How to Use Claude Code Subagents for GEO Research
- How to Use Claude Code Hooks as SEO/GEO Quality Gates
- How to Connect Claude Code to SEO Data with MCP
- How to Use Claude Code GitHub Actions for SEO/GEO Reviews
- How to Run Daily SEO/GEO Monitoring in Claude Code
Sources and notes
- Anthropic Claude Code docs: GitHub Actions and Claude Code overview .
Author: Tessa Clarke, Content Governance Lead for 120+ Editorial Systems at Auspia. Tessa writes about review systems, publishing standards, and safe AI-assisted content operations.